I have a perl script that records member logins on my Web site. Here's part of the code:
_____
open(FILE, ">>$log_file");
{($sec,$min,$hour,$day,$month) = localtime();
$month++;
if ($hour < 10)
{ $hour = "0$hour"; }
if ($min < 10)
{ $min = "0$min"; }
}
if ($password ne "xxxx") {
print FILE "$month/$day $hour:$min $password $ENV{'REMOTE_ADDR'}\n";
close(FILE);
_____
The problem is that the time printed to the log file for each login is one hour ahead of the time where I live. Presumably, localtime() on the server where my Web site resides (Server 24) is Eastern Time, whereas I live in the Central Time zone. What changes could I make to the script so that the time it prints to the log file matches my own time zone?