perl - Append a Z at the end of the UTC time -
I am using perl, and passing it - & gt;
dateTime-> and
sub get_datetime {my ($ datetime) = @_ now for the method below (time_zone = & gt; 'UTC')) My $ formatter = New Date Time :: Format :: Strong (Pattern = & gt; "% Y-% m-% d% H:% M:% S", Time_Jon => "UTC"); Return $ formatter-> format_datetime ($ datetime); } and I want to display time like 2012-10-10 10: 00: 01 z
How can I add z to the end of UTC time Am I I have pattern = & gt; "% Y-% m-% d% H:% M:% S% Z" but it does not compile.
Try:
Pattern = & gt; "% Y-% m-% d% H:% M:% SZ" % -We are part of the waze that are replaced by things from time to time; A literal Z should not contain% first.
Comments
Post a Comment