I have a date in the format: 05/26/2013 06:08:00
The timezone of above date is GMT -7
how can i change the above to GMT date and time and in format: 26 May 2013 13:08:00 GMT
Note: I cannot install any perl module. I know that i can do this easily via DateTime but i cannot install it.
Thanks.
You can use Time::Piece which should be included with your Perl installation.
Assuming your local time is already set to GMT-7, simply:
You may want
%d
instead of%e
and/or%b
instead of%B
; see http://pubs.opengroup.org/onlinepubs/9699919799/functions/strftime.html and verify that the desired format specifiers are supported on your system.