Mysql FROM_UNIXTIME as UTC

You would be better off setting the time zone ahead of time:

SET time_zone="UTC";
select FROM_UNIXTIME(1277942400);

The reason is that conversions involving a local time zone can be lossy. There is an example of this in the docs here (see the 4th paragraph under the UNIX_TIMESTAMP() section starting with “Note:”)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)