Karsten Petersen wrote:
Hi,
today I had *very* strange effects with the following code: <dtml-let bla="_.DateTime('2000/08/08')"> <dtml-var bla><br> <dtml-var expr="bla.parts()"><br> <dtml-var expr="bla.strftime('%Y/%m/%d')"><br> </dtml-let>
on my system it gave me: 2000/08/08 (2000, 8, 8, 0, 0, 0, 'GMT+2') 2000/08/07
Well - this was not quite what I expected. :)
I tracked the problem down to the timezone: When no time is given, the time is initialized with 00:00. So after applying gmtime in the strftime function (DateTime.py line 1379) it got shifted out and - hoppla - we have gone one day back in time. :)
Use the patch here: http://classic.zope.org:8080/Collector/1457/view -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net