[PBP-pm] Working with dates

Bennett Todd bet at rahul.net
Wed Dec 21 13:56:39 PST 2005


2005-12-21T21:24:29 Jay Buffington:
> > Also, avoid offsets, as time zones with the same offsets can
> > actually have a great deal of variation.
> So time_zone should always be something like 'America/Los-Angeles'.

There are two different use cases.

When you are doing timezone conversions, or specifying a timezone
for any use over a range of times, zoneinfo database refs, mostly
Continent/City, are the very best way to go; this stuff mutates many
times a year, but a large team of people are keeping the ado
database up to date.

However, when you want to have an external representation of a
single time object (or a whole file full of 'em), specifying the
zoneinfo database ref requires a large, variable-length field, and a
whack of a lot of extra computation to robustly process it. ISO 8601
/ RFC 3339 timestamps allow you to specify numerical offsets, which
robustly describe a single time entry. The key difference is that a
timestamp doesn't have weirdly mutating summer time shifts changing
the conversion rules.

-Bennett
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.pm.org/pipermail/pbp-pm/attachments/20051221/816bb07d/attachment.bin


More information about the PBP-pm mailing list