Page 1 of 1

Time Difference

Posted: Fri Oct 14, 2005 7:24 am
by bassett
Hi All,
Wondering if anyone can help, its probabily really simple but i just cant get my head round it.

Im currently working on a site which requires me to show how much time is left untill 7:30am each day, week, month and year

i.e.
-----------------------------------------------------------------------------------------------------------
Current DateTime(taken from server) -> End DateTime(7:30am every morning) -> DateTime Remaining
-----------------------------------------------------------------------------------------------------------
2005-10-14 20:00:00 -> 2005-10-15 07:30:00 -> 11hours 30minutes 0seconds //This is a daily countdown

2005-10-14 20:00:00 -> 2005-10-16 07:30:00 -> 1day 11hours 30minutes 0seconds ////Count to the end of the week

2005-10-14 20:00:00 -> 2005-11-01 07:30:00 -> 16days 11hours 30minutes 0seconds ////Count to the end of the month

2005-10-14 20:00:00 -> 2006-01-01 07:30:00 -> #days 11hours 30minutes 0seconds ////Count to the end of the year

Can anyone help?

Thanks

Posted: Fri Oct 14, 2005 7:29 am
by Grim...
You need mktime

Posted: Fri Oct 14, 2005 8:09 am
by feyd
viewtopic.php?t=29341 may be of interest too