Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- MySQL timezone support - setting from PHP
October 14, 2007, 6:54 pm
rate this thread
Re: MySQL timezone support - setting from PHP
mysql_query('SET time_zone = timezone_name');
Where the MySQL manual states:
timezone values can be given in several formats, none of which are case =
1. The value 'SYSTEM' indicates that the time zone should be the same as=
the system time zone.
2. The value can be given as a string indicating an offset from UTC, suc=
as '+10:00' or '-6:00'.
3. The value can be given as a named time zone, such as 'Europe/Helsinki=
'US/Eastern', or 'MET'. Named time zones can be used only if the time zo=
information tables in the mysql database have been created and populated=
Ideally, you could use:
mysql_query("SET time_zone = '".date_default_timezone_get()."'");
- » ssh on command line: force using a group size (prime size) of 1024 (and no...
- — The site's Newest Thread. Posted in » Secure Shell Forum