my $time = localtime; my $hours_behind_gmt = 4; # localtime is in seconds, hence we need to get hours --> seconds my $time_in_my_timezone = localtime - ($hours_behind_gmt * 60 * 60); print scalar localtime($time_in_my_timezone);