Posted by Mike Willbanks on 10/18/05 06:26
>>
>> This is what I get:
>> mysql> SELECT UNIX_TIMESTAMP('20051001');
>> +----------------------------+
>> | UNIX_TIMESTAMP('20051001') |
>> +----------------------------+
>> | 1128142800 |
>> +----------------------------+
>> 1 row in set (0.01 sec)
>>
> I don't get it. I don't know what "using local time" means;
> I think I'm going about it all wrong anyway.
> I'm trying to find the first and last day of the month of this datetime:
> 2005-10-17 19:10:11
The local time is specified by server time. If your server time is not
set or not enabled mysql can not really give you timestamps. However,
for what you are doing you could use the mysql function last_day(date)
if you are using 4.1.1 or greater for the last day :)
You should look into your server setup to see what is actually going on
when you are running that query. I ran mine from the shell using the
mysql client.
Mike
--
Mike Willbanks
Zend Certified Engineer
http://www.digitalstruct.com
Navigation:
[Reply to this message]
|