> > GoLive Gurus,
> GoLive? This is PHP :P

Doh! Sorry about that. Got my wires crossed.

> http://www.php.net/putenv
> putenv("TZ=EST"); etc. (check the user notes).

  Ah, that's done it! Thank you!
  Now, of course, the problem is MySQL. My PHP scripts all think they
are in Japan, and my MySQL db thinks it's Nevada. My impression from
reading the MySQL online manual is that what I need to do is set the
GLOBAL variable "TZ" to the Japan time zone. Armed with information from
the MySQL online manual, in phpMyAdmin, in the SQL command entry field,
I tried:
SET GLOBAL TZ=JST;
But it keeps rejecting it. I also tried the following:
SET GLOBAL TZ=Japan;
SET GLOBAL timezone=JST;
SET GLOBAL timezone='JST';
... and as many other combinations of codes and punctuation that I could
think of. But I believe I'm barking up the wrong tree. Question one is,
what is wrong with my syntax?
  Another thing that I have noticed is missing from most of the
documentation I have seen on the net and in the manuals is a listing of
what all the accepted codes for different time zones are. Every example
always uses either GMT, EST, PST or UTC. So I guessed the code for Japan
was "JST". But when I used putenv("TZ=JST"), it was off by a few hours.
So then I tried putenv("TZ=Japan"), and it's now correct. I've seen some
reference that Linux machines have a configuration file which would keep
a list of various time zone codes, but I haven't come across any
reference on the web which tells me what that list looks like. So,
question two is, how can I tell which is the right code to set "TZ" to?
"JST"? "Japan"?
  Your help is much appreciated.

-- 
Cheers!
Dave G
[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to