From windows, but just using std Perl functions: use Time::Local; my $MyKnownDate = timelocal(0,0,17,18,0,102); printf "%-s\n", scalar(localtime($MyKnownDate)); # just reprinting so you know we are using the # right date my $MyCurrTime = time; # Current time my $MySecondsElapsed = $MyCurrTime - $MyKnownDate; # get seconds between now and then my $MyMinutes = $MySecondsElapsed/60; # get minutes printf "Elapsed: Seconds- %7.0f Minutes: %7.1f\n", $MySecondsElapsed, $MyMinutes; Output: Fri Jan 18 17:00:00 2002 Elapsed: Seconds- 1117796 Minutes: 18629.9 Wags ;) -----Original Message----- From: KeN ClarK [mailto:ken@quantifier.org] Sent: Thursday, January 31, 2002 15:11 To: beginners@perl.org Subject: return # of minutes since 5:00pm Jan 18, 2002 in perl on linux box subject fairly sums it up. If I use localtime to get what time it is right now how can I determine the number of minutes between a KNOWN moment, such as above, and say, at the time the script is run? So far I have nothing and am perplexed... _____________________________________ http://quantifier.org GnuPG: 7C828670 georef: 33:54:5.879N 83:19:16.824W 6:00pm up 20:08, 3 users You're currently going through a difficult transition period called "Life." -- To unsubscribe, e-mail: beginners-unsubscribe@perl.org For additional commands, e-mail: beginners-help@perl.orgThread Previous