]> Pileus Git - ~andy/gtk/commitdiff
Bug 568571 – Asian am/pm format on cups print backend's time parsing
authorMarek Kasik <mkasik@redhat.com>
Thu, 12 Feb 2009 12:12:30 +0000 (12:12 +0000)
committerMarek Kašík <mkasik@src.gnome.org>
Thu, 12 Feb 2009 12:12:30 +0000 (12:12 +0000)
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

svn path=/trunk/; revision=22319

ChangeLog
modules/printbackends/cups/gtkprintbackendcups.c

index 2f4f1b0e1840958bf54499834170f12e378c1250..77a3dea8595935f5a2f3ff2daffd67c74e184e34 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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
+
 2009-02-11  Matthias Clasen  <mclasen@redhat.com>
 
        Bug 570824 – [a11y] TreeView is not keyboard (re)focusable after 
index 51dcc39ab3a379d814e5c9d04811e5b27b039353..0d2975f197950a48c18425e07269990965e41f75 100644 (file)
@@ -3529,16 +3529,20 @@ supports_am_pm (void)
   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;