on Fri, 26 Jul 2002 18:51:24 GMT, Jeff 'Japhy' Pinyan wrote: > On Jul 26, lz said: > >>I use Perl gmttime() to obtain UTC Time (formerly >>known as GMT Time) and unfortunately, value returned >>does not match official UTC time format: >> >>Official UTC Time Format = YYMMDDHHMMZ >> >>and here is what I get from gmtime() API= >>7321826610252060 > > gmtime() returns a list of numbers. (See perldoc -f gmtime)
I do believe the docs on gmtime are not correct though. The "number" above can be decomposed as follows 7 32 18 26 6 102 5 206 0 which is July 26, 2002 at 18:32:07 (hey, that's today :-) while perldoc -f gmtime says: gmtime EXPR Converts a time as returned by the time function to a 8-element list with the time localized for the standard Greenwich time zone. Typically used as follows: # 0 1 2 3 4 5 6 7 ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday) = gmtime(time); while in fact it returns a 9-element list (as localtime does), with the last element ($isdst) being 0 (false). my @array = gmtime(); print scalar @array; # prints 9, not 8 -- felix -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]