use Time::Timezone; my $offset = (sprintf "%0#3d", (tz_local_offset() / 3600)) . "00";