Re: Hi what is diff. Between mktime() and UNIX_TIMESTAMP()
| From: | Jason Wong | Date: | Thu, 14 Mar 2002 10:59:13 +0000 |
| Subject: | Re: Hi what is diff. Between mktime() and UNIX_TIMESTAMP() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-88467@lists.php.net to get a copy of this message | ||
On Thursday 14 March 2002 18:11, Jon Haworth wrote:
> > Unixtimestamp from Mysql :1016679600
> > Unixtimestamp from PHP :953699601
> > y this much difference?
>
> A PHP timestamp is the number of seconds since 1st Jan 1970
To be pedantic, in PHP it is time()
> A MySQL UNIX_TIMESTAMP is the date in YYYYMMDDHHMMSS format.
Not correct. In MySQL UNIX_TIMESTAMP also returns the number of seconds since
the unix epoch.
Thus:
php --> time();
mysql --> select UNIX_TIMESTAMP();
should both return the same value;
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
/*
In the next world, you're on your own.
*/