Re: GMT Time
| From: | Erik Price | Date: | Fri, 19 Apr 2002 17:34:15 +0000 |
| Subject: | Re: GMT Time | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-93737@lists.php.net to get a copy of this message | ||
On Friday, April 19, 2002, at 01:23 PM, Richard Fox wrote:
I want to compare a timestamp(14) field in a MySQL table with the current time. Currently I use the following pseudo-sql: select field from table where table.time < date("YmdHis", time()) only, the table timestamp is GMT time and the time function is returning local time. How do I convert time() to GMT time?MySQL has a function called NOW() which returns the current time. Use it: SELECT field FROM table WHERE table.time < NOW() ---- Erik Price Web Developer Temp Media Lab, H.H. Brown pricee@hhbrown.com