Title: [commits] (jeffrey) [11431] - Make shortTZ always return a string
Revision
11431
Author
jeffrey
Date
2006-08-16 17:04:11 -0700 (Wed, 16 Aug 2006)

Log Message

- Make shortTZ always return a string

Modified Paths

Diff

Modified: trunk/chandler/parcels/osaf/pim/calendar/TimeZone.py (11430 => 11431)

--- trunk/chandler/parcels/osaf/pim/calendar/TimeZone.py	2006-08-17 00:03:42 UTC (rev 11430)
+++ trunk/chandler/parcels/osaf/pim/calendar/TimeZone.py	2006-08-17 00:04:11 UTC (rev 11431)
@@ -235,8 +235,12 @@
     if dt.tzinfo is None or dt.tzinfo is PyICU.ICUtzinfo.floating:
         return u''
     elif dt.tzinfo != tzinfo:
-        return dt.tzinfo.timezone.getDisplayName(dt.dst(),
+        name = dt.tzinfo.timezone.getDisplayName(dt.dst(),
                                           dt.tzinfo.timezone.SHORT)
+        if not name:
+            return u''
+        else:
+            return name
     return u''
 
 def formatTime(dt, tzinfo=None, noTZ=False):




_______________________________________________
Commits mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/commits

Reply via email to