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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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....

-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux