in reply to Print time in Date"T"time+Gmtoffset

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

Replies are listed 'Best First'.
Re^2: Print time in Date"T"time+Gmtoffset ( iso-8601 )
by ikegami (Patriarch) on Apr 01, 2014 at 14:24 UTC
    Those aren't in the format the OP requested, and despite your "tag", those aren't valid iso8601 timestamps either.

      Those aren't in the format the OP requested, and despite your "tag", those aren't valid iso8601 timestamps either.

      And then what happened?

      Not for nothing, but yes, it is valid iso8601 ... and so what if its not 100% what the OP wants?

        And then you had a chance to fix your errors but failed to take it, leaving nothing but a useless post and a snarky comment.