Re[5]: Получение UTC, time()?
От: Alex Kirhenshtein Латвия http://www.netxms.org
Дата: 13.12.06 08:49
Оценка:
Здравствуйте, <Аноним>, Вы писали:

Ох. Торможу нещадно. Да, time отдает секунды с UTC. gmtime() это аналог localtime() — но не производит конвертации.

По теме:

UNIX_TIMESTAMP(), UNIX_TIMESTAMP(date)

If called with no argument, returns a Unix timestamp (seconds since '1970-01-01 00:00:00' UTC) as an unsigned integer. If UNIX_TIMESTAMP() is called with a date argument, it returns the value of the argument as seconds since '1970-01-01 00:00:00' UTC. date may be a DATE string, a DATETIME string, a TIMESTAMP, or a number in the format YYMMDD or YYYYMMDD. The server interprets date as a value in the current time zone and converts it to an internal value in UTC. Clients can set their time zone as described in Section 5.11.8, “MySQL Server Time Zone Support”.


Посмотреть таймзону: mysqladmin -u root -p variables | system_time_zone (может и иначе можно — не знаю, не пользуюсь)
Ну и всякое по времени: http://dev.mysql.com/doc/refman/5.0/en/time-zone-support.html
NetXMS: Open Source Network monitoring solution
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.