Time usually returns the number of seconds that have passed since January 1st 1970 (GMT). Check it on your platform by using perldoc, type "perldoc -f time" on a command line. You might find the (standard) module Time::Local useful, because it converts arbitrary dates into epoch time, eg;
perl -MTime::Local -e '$time = timegm(0,0,0,1,0,70); print"$time\n"'
Which will print out 0 if your computer uses the standard epoch.
or try:
perl -MTime::Local -e '$time = timelocal(40,46,3,9,8,101); print" $tim
+e\n"'
which will print out "1000000000", because back in November (3:46:40 seconds, November 9th 2001), epoch times started being ten digits.
- Boldra | [reply] [d/l] [select] |
You really need to read about the perl modules I have already given you. These will allow you to manipulate date/time in a portable way. If you pre-calculate reference times based on system time they will or may not be portable across OSes because EPOCH times may differ. Date:Calc will make your life much easier.
mitd-Made in the Dark
'Interactive! Paper tape is interactive!
If you don't believe me I can show
you my paper cut scars!' | [reply] |