This is how I do it:
in DB:
usertable
username,etc,tzone
where tzone = EST,PST,MNT,CNT
when the user logs in just grab the tzone, register it in the session.  Also
make them constants, so you know if the server is in CA, then EST = 10800

now when they do something, all you have to do is calc the time.  Like
result = mktime() - EST

Is this what you were talking about?

Jon


----- Original Message -----
From: "Joe Stump" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 30, 2001 2:56 PM
Subject: [PHP] timezones


> I have a quick question regarding timezones ...
>
> On the local side a record is inserted into the DB by someone in Michigan,
while
> the server rests in CA. Thus a three hour difference. The local mktime()
will
> create a timestamp for say 9:00am when in reality it was entered at
12:00noon
> in MI. I have 2 character timezones for all my users so it should be easy
to
> convert the two.
>
> putenv() won't work because of the fact that the timestamp created will be
> 9:00 no matter what timezone you put it in. So what needs to be done is
some
> recognition that 10800 seconds needs to be added to adjust the PST
timestamp
> to an EST timestamp. Are there any functions out ther that do this?
>
> --Joe
>
> Joe Stump <[EMAIL PROTECTED]>
> ------------------------------------------------------------------------
> One is taught by experience to put a premium on those
> few people who can appreciate you for what you are.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to