[Zope-dev] DateTime stftime and TAI based timezone is broken
or is it?
Brad Clements
bkc at murkworks.com
Wed Dec 3 10:49:49 EST 2003
On 2 Dec 2003 at 13:39, Jamie Heilman wrote:
> > >>> y = DateTime.DateTime(dx) y
> > DateTime('2003/12/01')
> > >>> y.strftime("%a %b. %d")
> > 'Sun Nov. 30'
> > >>> y.strftime("%a %b %d %H:%M:%S")
> > 'Sun Nov 30 23:59:38'
>
> Lovely. Its always bugged me that DateTime carried all its own zone
> information, but I guess even the datetime python modules punt in this
> regard. What I'm currious to know is how this caused problems for
> you, or your clients. I'd like to avoid those problems myself if I
> can help it.
My legacy site has a lot of <dtml-var somedatetimeobject fmt="%a %b %d">
this writes out the wrong day, because somedatetimeobject is just like you show above.
Also, I get different results instantiating a DateTime object with a string, vs. parts
DateTime(y,m,d,h,m,s) vs. DateTime('YYYY-MM-DD HH:MM:SS')
Why can't Zope just dynamically load the tzfile data as appropriate from the system if it
can?
--
Brad Clements, bkc at murkworks.com (315)268-1000
http://www.murkworks.com (315)268-9812 Fax
http://www.wecanstopspam.org/ AOL-IM: BKClements
More information about the Zope-Dev
mailing list