Your feedback: what should DateTime strftime() behavior be?
Hi all - There has recently been some confusion over the expected behavior of various approaches to DateTime formatting in Zope regarding timezone representation. I would like to resolve this for the next release by making a proposal and asking you to reply to the list with a "vote": +1 == agree +/-0 == no strong opinion -1 == disagree So then, here is the situation. In Zope 2.2 (and earlier), formatting a date using either: <dtml-var theDate fmt="%A, %B %d %Y, %H:%M:%S"> <dtml-var "theDate.strftime('%A, %B %d %Y, %H:%M:%S')"> ...would give you the date *formatted based on GMT rather than the timezone (usually local) representation of the object*. Simply doing: <dtml-var theDate> ...however, would print the date in the current timezone of the datetime object. Many feel that this difference is unintuitive and a pain. The proposal is that both: <dtml-var theDate fmt="%A, %B %d %Y, %H:%M:%S"> <dtml-var "theDate.strftime('%A, %B %d %Y, %H:%M:%S')"> ...would be changed to apply the format to the current TZ representation of the object rather than convert to GMT. Of course, this could be a problem if there are people currently counting on the output being GMT, which is why we're putting it to a vote. If this change is made for 2.2.1, those who still wanted the output in GMT could just call the 'toZone()' method of the datetime object to get a GMT version before formatting: <dtml-var "theDate.toZone('GMT').strftime('%A, %B %d %Y, %H:%M:%S')"> What do you think? Brian Lloyd brian@digicool.com Software Engineer 540.371.6909 Digital Creations http://www.digicool.com
Brian Lloyd wrote:
What do you think?
+1 -- Nick Garcia | ngarcia@codeit.com CodeIt Computing | http://codeit.com
+1 ----- Original Message ----- From: "Brian Lloyd" <Brian@digicool.com> To: <zope@zope.org> Sent: Tuesday, July 25, 2000 8:35 AM Subject: [Zope] Your feedback: what should DateTime strftime() behavior be?
Hi all -
There has recently been some confusion over the expected behavior of various approaches to DateTime formatting in Zope regarding timezone representation. I would like to resolve this for the next release by making a proposal and asking you to reply to the list with a "vote":
+1 == agree
+/-0 == no strong opinion
-1 == disagree
So then, here is the situation. In Zope 2.2 (and earlier), formatting a date using either:
<dtml-var theDate fmt="%A, %B %d %Y, %H:%M:%S">
<dtml-var "theDate.strftime('%A, %B %d %Y, %H:%M:%S')">
...would give you the date *formatted based on GMT rather than the timezone (usually local) representation of the object*. Simply doing:
<dtml-var theDate>
...however, would print the date in the current timezone of the datetime object.
Many feel that this difference is unintuitive and a pain. The proposal is that both:
<dtml-var theDate fmt="%A, %B %d %Y, %H:%M:%S">
<dtml-var "theDate.strftime('%A, %B %d %Y, %H:%M:%S')">
...would be changed to apply the format to the current TZ representation of the object rather than convert to GMT. Of course, this could be a problem if there are people currently counting on the output being GMT, which is why we're putting it to a vote. If this change is made for 2.2.1, those who still wanted the output in GMT could just call the 'toZone()' method of the datetime object to get a GMT version before formatting:
<dtml-var "theDate.toZone('GMT').strftime('%A, %B %d %Y, %H:%M:%S')">
What do you think?
Brian Lloyd brian@digicool.com Software Engineer 540.371.6909 Digital Creations http://www.digicool.com
_______________________________________________ Zope maillist - Zope@zope.org 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 )
my vote is: +1 Jerome ALET - alet@unice.fr - http://cortex.unice.fr/~jerome Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE
+1 I've said a lot on this already ;-) Chris On Tue, 25 Jul 2000, Brian Lloyd wrote:
Hi all -
There has recently been some confusion over the expected behavior of various approaches to DateTime formatting in Zope regarding timezone representation. I would like to resolve this for the next release by making a proposal and asking you to reply to the list with a "vote":
+1 == agree
+/-0 == no strong opinion
-1 == disagree
So then, here is the situation. In Zope 2.2 (and earlier), formatting a date using either:
<dtml-var theDate fmt="%A, %B %d %Y, %H:%M:%S">
<dtml-var "theDate.strftime('%A, %B %d %Y, %H:%M:%S')">
...would give you the date *formatted based on GMT rather than the timezone (usually local) representation of the object*. Simply doing:
<dtml-var theDate>
...however, would print the date in the current timezone of the datetime object.
Many feel that this difference is unintuitive and a pain. The proposal is that both:
<dtml-var theDate fmt="%A, %B %d %Y, %H:%M:%S">
<dtml-var "theDate.strftime('%A, %B %d %Y, %H:%M:%S')">
...would be changed to apply the format to the current TZ representation of the object rather than convert to GMT. Of course, this could be a problem if there are people currently counting on the output being GMT, which is why we're putting it to a vote. If this change is made for 2.2.1, those who still wanted the output in GMT could just call the 'toZone()' method of the datetime object to get a GMT version before formatting:
<dtml-var "theDate.toZone('GMT').strftime('%A, %B %d %Y, %H:%M:%S')">
What do you think?
Brian Lloyd brian@digicool.com Software Engineer 540.371.6909 Digital Creations http://www.digicool.com
_______________________________________________ Zope maillist - Zope@zope.org 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 )
+1 On Tue, 25 Jul 2000, Brian Lloyd wrote:
Hi all -
There has recently been some confusion over the expected behavior of various approaches to DateTime formatting in Zope regarding timezone representation. I would like to resolve this for the next release by making a proposal and asking you to reply to the list with a "vote":
+1 == agree
+/-0 == no strong opinion
-1 == disagree
So then, here is the situation. In Zope 2.2 (and earlier), formatting a date using either:
<dtml-var theDate fmt="%A, %B %d %Y, %H:%M:%S">
<dtml-var "theDate.strftime('%A, %B %d %Y, %H:%M:%S')">
...would give you the date *formatted based on GMT rather than uthe timezone (usually local) representation of the object*. Simply doing:
<dtml-var theDate>
...however, would print the date in the current timezone of tthe datetime object.
Many feel that this difference is unintuitive and a pain. The proposal is that both:
<dtml-var theDate fmt="%A, %B %d %Y, %H:%M:%S">
<dtml-var "theDate.strftime('%A, %B %d %Y, %H:%M:%S')">
...would be changed to apply the format to the current TZ rrepresentation of the object rather than convert to GMT. Of course, this could be a problem if there are people currently counting on the output being GMT, which is why we're putting it to a vote. If this change is made for 2.2.1, those who still wanted the output in GMT could just call the 'toZone()' method of the datetime object to get a GMT version before formatting:
<dtml-var "theDate.toZone('GMT').strftime('%A, %B %d %Y, %H:%M:%S')">
What do you think?
Brian Lloyd brian@digicool.com Software Engineer 540.371.6909 Digital Creations http://www.digicool.com
_______________________________________________ Zope maillist - Zope@zope.org 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 )
+1 -- Tim Cook -- FreePM Project Coordinator - http://www.freepm.org OS Healthcare Alliance Supporter - http://www.oshca.org
+----[ Brian Lloyd ]--------------------------------------------- | Hi all - | | There has recently been some confusion over the expected | behavior of various approaches to DateTime formatting in | Zope regarding timezone representation. I would like to | resolve this for the next release by making a proposal | and asking you to reply to the list with a "vote": | | +1 == agree | | +/-0 == no strong opinion | | -1 == disagree You will only ever see votes from people wanting change... apathy rules otherwise. Then when it changes you'll see a whole bunch of bitching about the change, and how there's 1,000 people on the list and only 20 people voted... etc. d8) Mailling list votes are often a bad idea... -- Totally Holistic Enterprises Internet| P:+61 7 3870 0066 | Andrew Milton The Internet (Aust) Pty Ltd | F:+61 7 3870 4477 | ACN: 082 081 472 ABN: 83 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068 |akm@theinternet.com.au|
+1 == agree
+/-0 == no strong opinion
-1 == disagree
+1 (If anyone *does* have an objection, they'd better get in quick before it's too late!) ;-) John -- John Chandler / Software Developer / New Information Paradigms Ltd [ Linux in the office, AmigaOS in the home, PalmOS in the pocket ] ------------------------------------------------------------------------ The opinions above aren't those of my company... ...but then, they aren't really mine either.
+1 -- jmce: +351 919838775 ~ http://artenumerica.com/ ~ http://artenumerica.org/
participants (14)
-
Andrew Kenneth Milton -
Andy McKay -
Brian Lloyd -
Chris Withers -
Dan L. Pierson -
J M Cerqueira Esteves -
Jerome Alet -
John Chandler -
Nick Garcia -
Peter Arvidsson -
Rob Miller -
Steve Drees -
Svante Kleist -
Tim Cook