Reply to Re: Using PHP with MySQL Datetime

Your name:

Reply:


Posted by Brandon on 01/20/07 00:28

> >$timestamp = "2005-04-06 15:43:34";
> >$time = strtotime($timestamp);
> >print date('Y-m-d \a\t H:i', $time)."\n";
> >
> >However, it seems kind of counter productive. After all, aren't people
> >(and RDBMs like MySQL) getting away from Unix timestamps for the a
> >reason?
>
> PHP's underlying storage of dates, last time I looked, *IS* the UNIX
> timestamp, with all the time range limits that involves.

There's an "underlying" storage for dates? I wasn't aware that PHP had
a true date type for a timestamp for "lie under." Timestamps are just
integers. PHP may have a lot of functions for parsing strings into
integer timestamps and building strings from those integers but that
doesn't mean there's any trick to using representing a date with
another data type. I was just hoping that PHP would have something
built in for storing dates in a format other than timestamps. From the
look of the parse_date() function I mentioned, it looks like something
might be in the works but hasn't made its way to an official release
yet.

Actually, the PEAR libraries have a true date data type but I'm not
sure where my app is ultimately going to be deployed so I'd rather not
rely on it.

[Back to original 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

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