The Epoch in NT and Win95 with ActivePerl is Jan 1, 1970 at 00:00:00 GMT as it should be.
Try This:
@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");
You should get something like: Thu Jan 01 0:00:00 GMT 1970
alternately, 13239664 seconds after the epoch gives you June 3, 1970, at 5:41:04
This works under both Win95 and WinNT |