[Zope3-dev] Re: [Python-Dev] Holes in time

Leonardo Rochael Almeida leo@hiper.com.br
09 Jan 2003 15:41:11 -0200


On Sat, 2003-01-04 at 10:03, Sidnei da Silva wrote:
> On Fri, Jan 03, 2003 at 05:04:18PM -0500, Guido van Rossum wrote:
> | > One downside is that then you can't expect normal programmers to writ=
e a=20
> | > correct tzinfo based on the C libraries.  They'll never get it right.=
=20
> | > :-)  It would have to be supplied with Python.
> |=20
> | This is one of the reasons against it; we can't possibly supply
> | timezone implementations for every country, so we really need people
> | to write their own.
>=20
> Specially when the daylight savings time is not always fixed like in
> Brazil, where last year the govt simply decided that it would start
> in a different date to save something like 0.001% more energy :)

Actually, it's worse than that. It's a different day every single year!
And it's decide by a decree! (or law or some other political decision
thingie which I don't remember) It's usually decided to match a
saturday-sunday transition so as to make it easier on people biological
clocks.

And if you think that's bad enough, this last year the Governor of the
state of Goi=E1s decided for some unknown reason that his state would not
to enter into DST with the rest of DST states (states to the north of
Brazil don't enter DST, as they're too close to the Equator to actually
gain anything from DST), and so he passed a state law to that effect.
The federal government sued and asked for an injuction, at which point I
stopped following the confusion :-)

Another case, which I don't know if it's really true but sounds
plausible, happend when the Pope last came to visit Brazil. The
Brazillian TV stations (or was it just GloboTV?) sold the signal to
foreign TV stations months before the event, which would happen in the
first weeks of DST. I don't know whose fault it was, but someone
somewhere forgot to take DST into account and the station(s) came crying
to the government. So a second decree was passed that year to change the
previously issued DST transition date to just after the Pope departure.

Every september, the e-mail traffic between Brazillian unix sysadmins
increase to decide who will be the first to take the trouble to find out
when the DST transition will happen and build an appropriate tzinfo
source file.

Anyway, to bing this e-mail back on topic, I like the unix solution to
the problem: all times are in UTC and a conversion is made when a user
needs the local time, since "utc -> local time" is a function. If
storing local times is necessary, it should have a "isDST" field or some
such.

but-then-again-what-do-I-know'ly yours Leo

--=20
Ideas don't stay in some minds very long because they don't like
solitary confinement.