in reply to Re^3: Date Timezone
in thread Date Timezone
Hi
Thanks for the help, but I only found one solution: to put the following inside the function:$zone must be declared 'local' outside the procedure. We can play actually with 2 timezones (not putting GMT but $zone2 for example). Regards. Keplermy $dt = DateTime->new( year => $my_year, month => $my_mon, day => $my_day, hour => $my_hours, minute => $my_minutes, time_zone => 'GMT', ); $dt->set_time_zone( $zone ); $rh = $dt->hour; #returns the adjusted hour $rm = $dt->minute; #returns the adjusted minutes
|
|---|