Re: Dates - adding to unix 86400 seconds not equal nextday

From: Date: Thu, 02 Sep 2004 00:29:17 +0000
Subject: Re: Dates - adding to unix 86400 seconds not equal nextday
Groups: php.db 
Request: Send a blank email to php-db+get-36007@lists.php.net to get a copy of this message
Of course, it's because the whole of Summer is an hour out and this changes 31 Oct. I had it backwards. I'd still like to find out if there is a mysql equivalent of gmmktime for use in queries like: "SELECT UNIX_TIMESTAMP(mydate) FROM MyTable WHERE UNIX_TIMESTAMP(mydate)<='$thisdate'"; and $thisdate is a gm date. Otherwise I need to convert the GMT date back to Summer time just for the query. Is there a function for that....? John
Using the MySQL UNIX_TIMESTAMP() seemed to give the wrong date, 08 10 2004. I did not find the gmdate equivalent in mysql.com. Conclusion: Using gmmktime and gmdate seems to work and is needed where intervals are to be calculated and number of days added to dates. Query: why the above SQL gave the wrong date with mktime when the date was 9 October....


« previous php.db (#36007) next »