Re: [Zope] Patch to DateTime.py
On Fri, 07 Jul 2000, Rajil Saraswat wrote: > Hi, > I am a newbie to zope and squish. My squishdot starts giving errors after > midnight. the offending error is Unrecognised Time Zone in DateTime.py > I am on GMT+530(India). As i donot know python, can you please tell where > i should add this timezone in DateTime.py, so this problem is resolved. > The patch file i supplied can be applied to /lib/python/DateTime/DateTime.py If you don't have the unix tool 'patch', you could add the lines manually, at the lines mentioned at the top of the patch file. This is, i should have mentioned, made against zope 2.1.6 >From a quick perusal of the source code, it looks like there is no GMT+0530 supported currently, nor does the word "india" appear, except in the word 'Indiana'. A minor oversight, I'm sure. If you are feeling brave, you could try adding your timezone to the _zlst array, at about line 163 in DateTime.py, then restart ZOPE. > Thanks > Rajil Saraswat > Have a better one, Curtis. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] Patch to DateTime.py
> The people who want this site want the local time, not > UTC+0 that strftime > enforces. > > So, I created a tiny patch which adds > _.DateTime().strfltime(), which works > identically, except it passes LOCALTIME instead of GMTIME. > > It's tiny, it's simple, but it's REALLY HANDY! > Curtis - Please submit this to the Collector http://classic.zope.org:8080/Collector/ ...as a feature request w/patch. Patches posted via email tend to get lost in the rushing current of the lists :) Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations http://www.digicool.com ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Patch to DateTime.py
Hi, I am a newbie to zope and squish. My squishdot starts giving errors after midnight. the offending error is Unrecognised Time Zone in DateTime.py I am on GMT+530(India). As i donot know python, can you please tell where i should add this timezone in DateTime.py, so this problem is resolved. Thanks Rajil Saraswat On Fri, 7 Jul 2000, Curtis Maloney wrote: > Greetings, > > In my current project, I have to print a lot of dates. Fine, not a > problem... _.DateTime().strftime() is just the method, right? > > Wrong. > > The people who want this site want the local time, not UTC+0 that strftime > enforces. > > So, I created a tiny patch which adds _.DateTime().strfltime(), which works > identically, except it passes LOCALTIME instead of GMTIME. > > It's tiny, it's simple, but it's REALLY HANDY! > > Have a better one, > Curtis Maloney. > > > ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )