One way to get your current GMT timezone offset if you don't care about

Therefore, not appropriate for production use, but perhaps interesting or even enlightening. (:

Extending the technique to work in the face of some or all of the above conditions can be an interesting challenge.

( localtime time() + 3600*( 12 - (gmtime)[2] ) )[2] - 12

Replies are listed 'Best First'.
Re: Get timezone offset from GMT (cheap trick)
by thor (Priest) on Jun 04, 2004 at 21:29 UTC