[Zope] [Fwd: Re: [Zope-dev] DateTime formatting with strftime: patch]

Peter Arvidsson peter@innodev.com
Tue, 25 Jul 2000 08:20:12 +0200


-------- Original Message --------
Ämne: Re: [Zope-dev] DateTime formatting with strftime: patch
Datum: Mon, 24 Jul 2000 16:56:52 +0100
Från: Steve Alexander <steve@cat-box.net>
Till: zope-dev@zope.org
Referenser: <397C3F55.8C7D1251@cat-box.net>

This is now in the Collector, as bug number 1457.

  http://classic.zope.org:8080/Collector/1457/view

Incidentally, http://classic.zope.org:8080/Collector/1409/view is
another patch to the same problem. However, that patch doesn't address
the root of the problem, which is that DateTime instances are associated
with a particular timezone, and users expect all formatting to occur
with respect to that particular timezone. The fix in collector #1409
makes all strftime formatting happen in the local timezone of the Zope
installation, not the timezone given in the particular DateTime instance
being formatted.


Steve Alexander wrote:
> 
> Here's a working patch to make formatting of a DateTime instance work as
> generally expected, when you use
> 
>   <dtml-var "_.DateTime()" fmt="%d %G %z">
> 
> or whatever.
> 
> It could be made more efficient by compiling the two regex (regexes?
> regexen? regular expressions :-) ) into class attributes.

There's a problem with this optimisation -- see my other posting to
zope-dev today.
 
--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net

_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )