use DateTime; local $\ = $/; print DateTime->now( qw[ time_zone local ] )->strftime('%F-%H-%M-%S%z'); print DateTime->now( qw[ time_zone Greenwich ] )->strftime('%F-%H-%M-%S%z'); __END__ 2014-03-31-23-45-31-0700 2014-04-01-06-45-31+0000