[Xfce4-commits] r29652 - xfcalendar/trunk/src

Juha Kautto juha at xfce.org
Thu Mar 12 14:23:41 CET 2009


Author: juha
Date: 2009-03-12 13:23:40 +0000 (Thu, 12 Mar 2009)
New Revision: 29652

Modified:
   xfcalendar/trunk/src/functions.c
Log:
Fixed error in UTC time handling. Orage did not accept valid UTF time, but
gave error and aborted.


Modified: xfcalendar/trunk/src/functions.c
===================================================================
--- xfcalendar/trunk/src/functions.c	2009-03-11 23:35:58 UTC (rev 29651)
+++ xfcalendar/trunk/src/functions.c	2009-03-12 13:23:40 UTC (rev 29652)
@@ -404,7 +404,9 @@
         t.tm_sec = -1;
     }
     else if (ret[0] != 0) { /* icaltime was not processed completely */
-        g_error("orage: orage_icaltime_to_tm_time error %s %s", icaltime, ret);
+        if (ret[0] != 'Z' || ret[1] != 0) /* UTC times end to Z, which is ok */
+            g_error("orage: orage_icaltime_to_tm_time error %s %s", icaltime
+                    , ret);
     }
 
     if (!real_tm) { /* convert from standard tm format to "normal" format */
@@ -494,7 +496,7 @@
     /* need to fill missing tm_wday and tm_yday, which are in use 
      * in some locale's default date. For example in en_IN. mktime does it */
     if (mktime(t) == (time_t) -1) {
-        g_warning("orage: orage_icaltime_to_tm_time mktime failed %d %d %d"
+        g_warning("orage: orage_move_day mktime failed %d %d %d"
                 , t->tm_year, t->tm_mon, t->tm_mday);
     }
 }




More information about the Xfce4-commits mailing list