#!/usr/bin/perl use strict; use warnings; ### US Time Zones #my $time_zone = 'US/Alaska'; #my $time_zone = 'US/Aleutian'; #my $time_zone = 'US/Arizona'; #my $time_zone = 'US/Central'; my $time_zone = 'US/Eastern'; #my $time_zone = 'US/East-Indiana'; #my $time_zone = 'US/Hawaii'; #my $time_zone = 'US/Indiana-Starke'; #my $time_zone = 'US/Michigan'; #my $time_zone = 'US/Mountain'; #my $time_zone = 'US/Samoa'; #my $time_zone = 'US/Pacific'; ### set time zone for Perl to access with localtime ### can be any zone listed in /usr/share/zoneinfo and its subfolders $ENV{TZ} = $time_zone; print "System Time Zone from Perl is $ENV{TZ}\n"; my $timenow = localtime(time); print "Time from System is $timenow\n";