Welcome to the Monastery | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
From the docs: Years in the range 0..99 are interpreted as shorthand for years in the rolling "current century," defined as 50 years on either side of the current year. Thus, today, in 1999, 0 would refer to 2000, and 45 to 2045, but 55 would refer to 1955. Twenty years from now, 55 would instead refer to 2055. This is messy, but matches the way people currently think about two digit dates. Whenever possible, use an absolute four digit year instead. Last time I checked, 2004 - 1948 > 50, so it is assuming that you mean 2048 (stored internally to perl as year 148). As the docs also note: Please note, however, that the range of dates that can be actually be handled depends on the size of an integer (time_t) on a given platform. Currently, this is 32 bits for most systems, yielding an approximate range from Dec 1901 to Jan 2038. And 2048 > 2038. So you might want to do as the docs suggest and stick with a four digit year. If anyone needs me I'll be in the Angry Dome. In reply to Re: Bug in Time::Local?
by idsfa
|
|