[Zope] date property format
julio dinis
juliodinis@hotmail.com
Mon, 27 Mar 2000 11:50:40 PST
Hello you all!
I have a timestamp, for instance, 2000/03/27 19:57:53.9808 GMT.
Lets say I have a document property, type date, where I want to
store this timestamp.
I found that the use of A or B is different:
A)
<dtml-call "REQUEST.set('Prop1', ZopeTime())">
<dtml-call "manage_changeProperties(REQUEST)">
B)
<dtml-call "REQUEST.set('Prop1', ZopeTime())">
<form action=manage_changeProperties>
<input type="text:date" name="mydate" value=<dtml-var Prop1>
<input type=submit>
</form>
The difference arise when formating for presentation:
A)
Code : <dtml-var Prop1 fmt="%Y/%m/%d %H:%M">
Output : 2000/03/27 18:57
B)
Code : <dtml-var Prop1 fmt="%Y/%m/%d %H:%M">
Output : 2000/03/27 19:57
Note: the 1 hour difference.
I guess the difference is in the "Prop1:date" that forces
zope to create the correct object with all the information needed to,
for instance, recognize the GMT change since March 26.
I found that using another kind of presentation format will
bypass this problem, i.e, instead of fmt="c style", I use functions like
dd(), mm(), timeminutes().
Is there a way to make the code A tell zope to create a
correct date object(property)?
My best regards,
Júlio Silva
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com