Re: Date Calculation

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

 



I guess.

Are you telling me that I should take the timestamp, convert it to epoch time, the us the time function to get the current epoch time, then subtract the timestamp epoch time from the current epoch time? I think that is what you are saying.

I know I can get the current epoch time in php with time(). How do I convert the timestamp in the database to epoch time, or find the epoch time in bash? If I can't do it in either, then I am subtracting apples from oranges.


On Oct 28, 2004, at 2:32 PM, Jay Blanchard wrote:

[snip]
That's not quite what I am talking about. I looked at that already.

I can could also put the date and time that the script was ran into the
MySql database by have a TIMESTAMP field in the database.
[/snip]

You can use that to convert your time in the DB, get the current time
when seeking as epoch time, subtract one from the other....no?


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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux