No-no, it's not about performance, but about the most ordinary hours =)
Once I saw something in PHP
$date = mysql_result(mysql_query("SELECT CURRENT_TIMESTAMP"), 0, 0);
It seems that it was a shit case ...
')
He laughed and forgot. Then I climbed from Ubuntu to Windows, and yesterday something interesting happened =) MySQL and PHP in XAMPP (LAMPP) returned a different current time!
print(date('Ymd H:i:s'));
// 2009-06-20 8:00:00
print("\n", mysql_result(mysql_query("SELECT CURRENT_TIMESTAMP"), 0, 0));
// 2009-06-20 15:00:00
because under Windows, a similar problem was not observed, rummaged in the internet and found out that Linux and Windows interpreted the system time differently. Winda sets the system time in accordance with the local (and she does it constantly with each boot and synchronization), and Linux considers the system time UTC and local counts based on the set time zone.
Output 1. Adjust the Linux system time to local
1. Set the time to the current.
user@server:~$ sudo date -s 12:00
2. Make the system time local:
user@server:~$ sudo /sbin/hwclock --systohc --localtime
3. Synchronize local and system time:
user@server:~$ sudo /sbin/hwclock --hctosys --localtime
4. Restart the computer if necessary. Well, in my case, you just had to restart XAMPP / LAMPP
user@server:~$ sudo /opt/lampp/lampp restart
Logout 2. Customize MySQL time zone
Presumably (since I was satisfied with the first solution) here:
dev.mysql.com/doc/refman/5.1/en/time-zone-support.htmlExit 3. Move to London
But since there is summer time, this solution works only 6 months a year. But Algerian sysadmins never had such a problem =)