Re: Calculating Past Dates In A Different Time Zone
| From: | Matt Pelmear | Date: | Mon, 11 Nov 2013 02:03:23 +0000 |
| Subject: | Re: Calculating Past Dates In A Different Time Zone | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-48833@lists.php.net to get a copy of this message | ||
Typically, yes.
It is possible you don't have the time zone tables populated. "America/Bahia" works for me, so I suspect that is the case.
The relevant manual page to load this data (assuming your server is running in a unix environment) is here:
http://dev.mysql.com/doc/refman/5.0/en/mysql-tzinfo-to-sql.html
If it is running in a Windows environment:
http://dev.mysql.com/downloads/timezones.html
-Matt
On 11/10/2013 04:22 PM PT, Ron Piggott wrote:
A suggestion I was given is to use the mySQL "CONVERT_TZ" command with the PHP time zone names. But when I do: SELECT CONVERT_TZ(journal_entry.occurance_date, 'GMT', 'America/Bahia' ) FROMjournal_entryI am receiving "NULL" as the resulting date. Does mySQL accept PHP time zone names? Ron