develooper Front page | perl.perl6.language.datetime | Postings from September 2000

Re: RFC 99 (v3) Standardize ALL Perl platforms on UNIX epoch

Chaim Frenkel
September 14, 2000 14:47
Re: RFC 99 (v3) Standardize ALL Perl platforms on UNIX epoch
Message ID:
>>>>> "CN" == Chris Nandor <> writes:

CN> No, that won't really work.  When my offset from GMT changes for daylight
CN> savings time, it will break.  The point of having a module is that epoch
CN> conversions are more complicated than that.  For example, Mac OS epoch
CN> begins at Jan 1 1904 00:00:00 _local time_.  That is why the timezone
CN> offset from GMT was passed to the Time::Epoch functions.

I'm confused.

How do you expect the program to know the timezone if the OS doesn't?
And if the program knows it and can track it, then we can hand off the
responsibility to Perl. Then the epoch would 'vary' according to whatever
nonsense is necessary. 

But if the values wander so badly, what does the OS use? If perl has to
convert away, then it can easily use Unix epoch.

CN> Also, you might want to convert between other epochs; what if you get an
CN> epoch value FROM Mac OS on a Unix box, and want to convert it?

That's a different problem than we are trying to solve. This is a wider
problem then a fixed epoch for perl. Let's turn this around. What if
we are on a platform that doesn't use perl's epoch and we need to write
a value to a file?

I think I've just gotten very confused.
Chaim Frenkel					     Nonlinear Knowledge, Inc.				               +1-718-236-0183 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About