Re: [Zope] Re: DateTime(), locale, summertime etc.

2005-04-09 Thread Paul Winkler
On Thu, Apr 07, 2005 at 11:22:39AM -0400, Paul Winkler wrote:
 Maybe this is relevant:
 http://www.zope.org/Collectors/CMF/325
 
 ... crap, I never merged the fix. 

OK, now this is merged to the trunk and CMF-1_5-branch.

-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: DateTime(), locale, summertime etc.

2005-04-07 Thread Max M
Max M wrote:
I have a product where I convert some external datetimes to zope 
DateTime() objects. I save them as UTC as zopes DateTime does by default.

But when these are rendered, the time is offset by two hours.

Ok. I was unclear here.
I convert from datetime objects (python) to DateTime (zope) objects.
The datetime objects are in UTC format. So are the DateTime objects.
On an external system I enter a time of 11:00. The external system then 
saves the value as 9:00 UTC, which is correct. Taking summertime and 
time zone offset into account.

When I convert to DateTime objects, they are saved as 9:00 Universal. 
So that is correct too.

The DateTime objects are then displayed in Zope/Plone in UTC time.
I would expect Zope to represent them in the systems locale 'danish' and 
display them as 11:00

I have set the locale danish directive in my zope.conf, but that 
doens't change anything.

Does anybody have an idea as to what to try out next?
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: DateTime(), locale, summertime etc.

2005-04-07 Thread Max M
Max M wrote:
When I convert to DateTime objects, they are saved as 9:00 Universal. 
So that is correct too.
Ok. Turned out that I have misunderstood zopes DateTime().
It saves in UTC, but it still needs a timezone.
So converting datetime objects to the local timezone and then converting 
to DateTime objects also as local timezone did the trick.

hmmm
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: DateTime(), locale, summertime etc.

2005-04-07 Thread Paul Winkler
On Thu, Apr 07, 2005 at 02:44:38PM +0200, Max M wrote:
 Max M wrote:
 
 When I convert to DateTime objects, they are saved as 9:00 Universal. 
 So that is correct too.
 
 Ok. Turned out that I have misunderstood zopes DateTime().
 
 It saves in UTC, but it still needs a timezone.
 
 So converting datetime objects to the local timezone and then converting 
 to DateTime objects also as local timezone did the trick.
 
 hmmm

Maybe this is relevant:
http://www.zope.org/Collectors/CMF/325

... crap, I never merged the fix. 
I should really make it a habit to read the CMF issues nag mail :-0

-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )