How can I find the time zone? The end result I need to figure out if the date/time is in daylight savings or not. I've found:
[HIGHLIGHT="Perl"]use POSIX (strftime);
($d = strftime("%z", localtime)) =~ s/(\d\d)(\d\d)/$1:$2/;
print "$d\n";[/HIGHLIGHT]
which gives me this error:
"Unquoted string "strftime" may clash with future reserved word at timezone.pl line 12."
But it does output "Eastern Daylight Time". Is there a better way to do this or is there a way I can remove the warning?
use POSIX qw(strftime);
That works! Thanks! What does the qw() mean?
qw = quote words
is the equivalent of:
use POSIX ("strftime");
Last edited by KevinADC; 10-05-2007 at 11:15 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks