Posted by Mike Willbanks on 10/18/05 05:36
meltedown wrote:
> Why does this return 0 ?
>
> SELECT UNIX_TIMESTAMP('20051001');
>
> It should be the unix timestamp of that date.
That would suggest you are using local time, if there a locale set on
mysql and also another thing to check, is the date set :)
This is what I get:
mysql> SELECT UNIX_TIMESTAMP('20051001');
+----------------------------+
| UNIX_TIMESTAMP('20051001') |
+----------------------------+
| 1128142800 |
+----------------------------+
1 row in set (0.01 sec)
--
Mike Willbanks
Zend Certified Engineer
http://www.digitalstruct.com
Navigation:
[Reply to this message]
|