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

Popular posts from this blog

java - NullPointerException for a 2d Array -

python - Assemble mpeg file unable to play in mediaplayer -

c# - NameSpace Manager or XsltContent to parse aspx page -