in reply to RE: Check out PerlMonth
in thread Check out PerlMonth
Try This:
You should get something like: Thu Jan 01 0:00:00 GMT 1970@DoW = ('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); @MoY = ('Jan','Feb','Mar','Apr','May','Jun', 'Jul','Aug','Sep','Oct','Nov','Dec'); $TZ = "GMT"; ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = gmtime +(0); #seconds after epoch $year += 1900; $date = sprintf("%s %s %02d %2d:%02d:%02d %.3s %4d\n", $DoW[$wday], $MoY[$mon], $mday, $hour, $min, $sec, $TZ, $year); print ("$date\n");
alternately, 13239664 seconds after the epoch gives you June 3, 1970, at 5:41:04
This works under both Win95 and WinNT
|
|---|