Re: Convert date to timestamp
- From: shawn.corey@xxxxxxxxxxxx (Shawn Corey)
- Date: Fri, 02 Dec 2005 15:49:08 -0500
Timothy Johnson wrote:
Correction: That line should be:
my $perlTime = timelocal("01","01","01",$day,$month - 1,$year);
You should use noon, not midnight (or close to it).
my $unix_epoch = timelocal( 0, 0, 12, $day, $month - 1, $year - 1900 );
Here in North America (at least in most places) there is one day that has 25 hours and one that has 23 hours every year. Using noon, will get around most of the problems with this.
For more info, search the web for 'Daylight Saving Time'.
--
Just my 0.00000002 million dollars worth, --- Shawn
"Probability is now one. Any problems that are left are your own." SS Heart of Gold, _The Hitchhiker's Guide to the Galaxy_ .
- References:
- RE: Convert date to timestamp
- From: Timothy Johnson
- RE: Convert date to timestamp
- Prev by Date: Re: Missing something with Getopt::Std
- Next by Date: Re: Missing something with Getopt::Std
- Previous by thread: RE: Convert date to timestamp
- Next by thread: Missing something with Getopt::Std
- Index(es):