in reply to getting time local to a user supplied offset...

gmtime provides UTC. Feed it time() +/- the right number of seconds and you're done.

# Untested print 'enter gmt time offset: '; $offset = <>; # sample input would be '-6' or '3', etc ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday) = gmtime(time() +$offse +t * 3600); $offsettime = ''. gmtime(time() +$offset * 3600);
--Bob Niederman, http://bob-n.com

Replies are listed 'Best First'.
Re: Re: getting time local to a user supplied offset...
by Anonymous Monk on Jul 21, 2003 at 00:41 UTC
    it sort of works, but its off by 6 hours...

      You caught me while I discovered that I wanted gmtime(), rather than localtime().

      --Bob Niederman, http://bob-n.com
        thats it, it works! its off by an hour cause of dst, but i figured id have to adjust for that anyway. thanks a bunch!