Timezones in MySQL

Timezone
[root@server02 ~]# date 
Fri Feb 24 02:11:38 CST 2012
MySQL time-zone:
mysql> show global variables like ‘%time_zone%’;

+——————+——–+

| Variable_name | Value |

+——————+——–+ 

| system_time_zone | CST |

| time_zone | SYSTEM |

+——————+——–+

2 rows in set (0.00 sec)

mysql> show variables like ‘%time_zone%’;

+——————+——–+

| Variable_name | Value |

+——————+——–+

| system_time_zone | CST |

| time_zone | SYSTEM |

+——————+——–+

2 rows in set (0.00 sec)

The MySQL timezone is inherited from the server’s timezone.

PHP timezone is CST (also inherited from the server timezone).

[root@server02 ~]# php 2>/dev/null


< ?php 
echo date_default_timezone_get(); 
?>

America/Chicago

About vicki

Welcome to the Sovereign Republic of Vickistan. I am the President here. Lucky me! No taxes or laws yet. Lucky you!
This entry was posted in Linux. Bookmark the permalink.