Subject: | Time zone of DateTime objects is ignored upon retrieval |
Date: | Wed, 28 Apr 2010 17:18:43 +1000 |
To: | bug-MongoDB [...] rt.cpan.org |
From: | Andrew Whatson <whatson [...] gmail.com> |
Hi,
MongoDB appears to be ignoring the time zone of stored DateTime objects upon
retrieval. I have attached a patch to add a failing test to MongoDB-0.33
which demonstrates this issue.
Analysis of the data in the database shows that the time zone is stored
correctly, so the bug must lie in the code that creates a DateTime object
from the stored value.
Looking at the code that decodes the retrieved data, it seems you need to
specify the 'time_zone' parameter along with 'epoch' to the 'from_epoch'
method of DateTime.
Regards,
Andrew
Message body is not shown because sender requested not to inline it.