You are here: Re: unix_timestamp « PHP Programming Language « IT news, forums, messages
Re: unix_timestamp

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация