Perl, get GMT time in format yyyy-mm-ddThh:mm:ssZ, from 2 seconds ago

rgbcof
rgbcof used Ask the Experts™
on
How do I get GMT time in format yyyy-mm-ddThh:mm:ssZ, from 2 seconds ago?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2007
Commented:

use POSIX 'strftime';
my $gmtime = strftime "%Y-%m-%dT%TZ",gmtime(time -2);

Open in new window

Author

Commented:
Problem solved.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial