[Numpy-discussion] fixing up datetime

Mark Wiebe mwwiebe at gmail.com
Thu Jun 2 13:46:18 EDT 2011


On Thu, Jun 2, 2011 at 12:17 PM, Benjamin Root <ben.root at ou.edu> wrote:

> <snip>
>
Just throwing it out there.  Back in my Perl days (I do not often admit
> this), the one module that I thought was really well done was the datetime
> module.  Now, I am not saying that we would need to support the calendar
> from Lord of the Rings or anything like that, but its floating timezone
> concept and other features were quite useful.  Maybe there are lessons to be
> learned from there?
>
>
The perl stuff does look very extensive. Here's a sample link:

http://www.perl.com/pub/2003/03/13/datetime.html

This maybe clarifies a little something I wrote before, where I suggested
the NumPy datetime is always UTC (or another unambiguous representation),
and repr/print use local time as the display format, which is still
unambiguous UTC but more human-readable.

They give an example where adding 6 months to a local time can cross a
daylight savings boundary, and having 'now' give back a local time instead
of UTC would imply that there is some kind of functionality like this in
there, very confusing. Better to leave local time as just a display format.

-Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20110602/536310d6/attachment.html>


More information about the NumPy-Discussion mailing list