gtk+ r22319 - in trunk: . modules/printbackends/cups
- From: mkasik svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r22319 - in trunk: . modules/printbackends/cups
- Date: Thu, 12 Feb 2009 12:12:30 +0000 (UTC)
Author: mkasik
Date: Thu Feb 12 12:12:30 2009
New Revision: 22319
URL: http://svn.gnome.org/viewvc/gtk+?rev=22319&view=rev
Log:
2009-02-12 Marek Kasik <mkasik redhat com>
Bug 568571 â Asian am/pm format on cups print backend's time parsing
* modules/printbackends/cups/gtkprintbackendcups.c: Add Asian am/pm
format into formats recognized by CUPS backend
Modified:
trunk/ChangeLog
trunk/modules/printbackends/cups/gtkprintbackendcups.c
Modified: trunk/modules/printbackends/cups/gtkprintbackendcups.c
==============================================================================
--- trunk/modules/printbackends/cups/gtkprintbackendcups.c (original)
+++ trunk/modules/printbackends/cups/gtkprintbackendcups.c Thu Feb 12 12:12:30 2009
@@ -3529,16 +3529,20 @@
return length != 0;
}
-/* Converts local time to UTC time. Local time has to be in HH:MM format or
- * in HH:MM:SS format or in HH:MM:SS {am, pm} format or in HH:MM {am, pm} format
- * or in HH {am, pm} format.
+/* Converts local time to UTC time. Local time has to be in one of these
+ * formats: HH:MM:SS, HH:MM, HH:MM:SS {am, pm}, HH:MM {am, pm}, HH {am, pm},
+ * {am, pm} HH:MM:SS, {am, pm} HH:MM, {am, pm} HH.
* Returns a newly allocated string holding UTC time in HH:MM:SS format
* or NULL.
*/
gchar *
localtime_to_utctime (const char *local_time)
{
- const char *formats_0[] = {" %I : %M : %S %p ", " %H : %M : %S ", " %I : %M %p ", " %H : %M ", " %I %p "};
+ const char *formats_0[] = {" %I : %M : %S %p ", " %p %I : %M : %S ",
+ " %H : %M : %S ",
+ " %I : %M %p ", " %p %I : %M ",
+ " %H : %M ",
+ " %I %p ", " %p %I "};
const char *formats_1[] = {" %H : %M : %S ", " %H : %M "};
const char *end = NULL;
struct tm *actual_local_time;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]