Hi, you seem to have missed the fact that calling gmtime in scalar context will format the return value as a scalar and produce exactly the same result as you get manually using spintf. This is one of those cases where calling a funtion in scalar context produces a different result to calling it in list context. You can save yourself a lot of effort by taking advantage of the scalar return value of gmtime() as all you actually need is this:
sub g3time{ return scalar gmtime( shift() + 3*60*60 ); } print g3time( time() );
Remove the scalar to see return impose list context on the result of gmtime and thus return the numerical list. As pointed out above calling your sub time conflicts with the built in time function and is highly *not* recommended, so I've renamed it g3time.
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In reply to Re: time zones
by tachyon
in thread time zones
by Yossi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |