betabug... Sascha Welter

home english | home deutsch | Site Map | Sascha | Kontakt | Pro | Weblog | Wiki

13 January 2010

DateTime SyntaxError on PDT Timezone

For example in the MiniPlanet
 

My MiniPlanet gave me SyntaxErrors on one feed, due to the feed in question being in the timezone "PDT". Problem is that Zope's DateTime module does not know that timezone. A quick search and some reading up suggested the following patch to $SOFTWARE_HOME/DateTime/DateTime.py:

--- old_DateTime.py     Wed Jan 13 10:21:24 2010
+++ DateTime.py Wed Jan 13 10:20:46 2010
@@ -246,6 +246,7 @@
            'us/samoa':'US/Samoa',

            'ut':'Universal',
+           'PDT':'GMT-7', 'pdt':'GMT-7',
            'bst':'GMT+1', 'mest':'GMT+2', 'sst':'GMT+2',
            'fst':'GMT+2', 'wadt':'GMT+8', 'eadt':'GMT+11', 'nzdt':'GMT+13',
            'wet':'GMT', 'wat':'GMT-1', 'at':'GMT-2', 'ast':'GMT-4',

(Patchfile, apply as usual, $STANDARD_DISCLAIMER applies, watch your steps!) Patching this directly in the Zope source code isn't the most elegant of solutions, but it works. (At least till the next Zope upgrade.) Well, it could be fixed in newer versions of Zope, what do I know with the old cruft that I'm running there.


Posted by betabug at 10:46 | Comments (1) | Trackbacks (0)
ch athens
Life in Athens (Greece) for a foreigner from the other side of the mountains. And with an interest in digital life and the feeling of change in a big city. Multilingual English - German - Greek.
Main blog page
Recent Entries
Best of
Some of the most sought after posts, judging from access logs and search engine queries.

Apple & Macintosh:
Security & Privacy:
Misc technical:
Athens for tourists and visitors:
Life in general:
<< Preparing moblog for a little hike | Main | Eislaufen oder nicht Eislaufen >>
Comments
Re: DateTime SyntaxError on PDT Timezone

AHA! so finally you find out what it was!

Too bad we have to patch the Zope's Datetime module. Perhaps you could send the patch so next zope release will not have this issue.

Posted by: Wu at January 13,2010 17:08
Trackbacks
You can trackback to: http://betabug.ch/blogs/ch-athens/1029/tbping
There are no trackbacks.
Leave a comment