Baba told me about his time zone class in pear
just recently.

-----Original Message-----
From: John Hughes [mailto:[EMAIL PROTECTED]]
Sent: May 24, 2002 4:45 PM
To: Miguel Cruz; [EMAIL PROTECTED]
Subject: Re: [PHP] adjusting time() to correct for
time zones

--- Miguel Cruz <[EMAIL PROTECTED]> wrote:
> On Fri, 24 May 2002, John Hughes wrote:
> > My server is located on the East Coast, but
all of the users of
> my
> > site live on the West Coast. I have an
application that makes
> several
> > calls to time() and as a result all of the
times displayed are
> East
> > Coast.
> >
> > Rather than changing every time() to
time()-10800, I was
> wondering if
> > there is a way to make one global change,
perhaps with .htacess.
> > Since this site is hosted on a commercial
service I do not have
> > access to the PHP.ini or other server-level
> How about writing a wrapper function called
l_time() that does the
> calculation for you? Stick it in an include
file, do a little
> searchin'-and-replacin', and you're set. One day
when you get
> ambitious
> you can enhance the l_time() function to look
for a cookie that
> identifies
> the current user's time zone and calculates
> miguel

Creating my own l_time() function would work, but
it would require
that every installed app on the this site be
customized.  Since the
site makes extensive use of OpenSource projects,
every time an app is
upgraded it would need to be re-hacked.

If there is no other choice, there is no other
choice. But in a
perfect world, there would be a way to locally
correct the server
time on a global basis and thus correct ALL
applications -- present
and future -- that need to know the "local" time.

John Hughes

Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience

PHP General Mailing List (
To unsubscribe, visit:

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to