Code:
use DateTime; my $dt = DateTime->now( time_zone => 'Europe/Paris' ); # set this to the Timezone you want!
print "FOO: " . $dt->ymd() . " - " . $dt->hms() . "\n";
To do it with the timestamp of a file, just do something like:
Code:
my $dt = DateTime->now( year => 2003,
month => 10,
day => 26,
hour => 1,
minute => 30,
second => 0,
time_zone => 'America/Chicago',
);
... and pass in the params (I *think* it cares if you have 05 - ie a leading 0, so be sure to trim that off)
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!