How does perl get the TZ DST data in Time::Local?

C

cade.robinson

I just read that in 2007 in the US that DST is changing dates.

Looks like all computers will need a patch for the TZ data and DST
changes.

My question is how does perl get TZ data?
Does it pull it from the machine?

So for example next year between 3/11 and 4/1 what happens when you use
Time::Local and use "timelocal" on the second past epoch?

Normally say you have X seconds and that translates to say Mar 20th
10:00am 2007.

Is that going to be the correct 10:00 am or will it be an hour behind?

If Time::Local has internal DST change tables won't that time be off?

Thanks
Cade
 
J

John Bokma

I just read that in 2007 in the US that DST is changing dates.

Looks like all computers will need a patch for the TZ data and DST
changes.

Yup, happened too when MS released Windows95 :-D.
 
C

cade.robinson

I revise this to include the "localtime" function.

I just tested on my Debian machine by getting the the seconds now with
"time" and then adding 276 days of seconds to it which put it at
3/10/07 and localtime shows that it is right. Then I add another day
and it shows that the DST offset happened.

I also tried on a Tru64 machine and it is wrong.
So is that perl or the OS?
 
B

Ben Morrow

Quoth (e-mail address removed):
I just read that in 2007 in the US that DST is changing dates.

Looks like all computers will need a patch for the TZ data and DST
changes.

My question is how does perl get TZ data?
Does it pull it from the machine?

Yup, or at least, the modules I know about do :). (There's nothing to
prevent someone from writing a TZ system in Perl, but...)

Presumably you will need to update your tz database from somewhere, the
procedure for which will depend on your OS (come to think of it, I don't
know how to do it for mine... not that I care terribly much, not being
in the US :) ).

Ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top