#mysql #unixtime quirk unixtime(123) = 01:02:03

#mysql #unixtime quirk unixtime(123) = 01:02:03

mysql> select from_unixtime(0);
+---------------------+
| from_unixtime(0)    |
+---------------------+
| 1970-01-01 01:00:00 |
+---------------------+
1 row in set (0.00 sec)


mysql> select from_unixtime(123);
+---------------------+
| from_unixtime(123)  |
+---------------------+
| 1970-01-01 01:02:03 |
+---------------------+
1 row in set (0.01 sec)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s