Jump to content

Time at start of day?


Diegar

Recommended Posts

Is there a quick and easy way to get a unix timestamp of the beginning of the day, so if i wanted a specific time, i could add that many seconds to it? Server time is fine. I can adjust it for time zone. Having trouble with this. Thanks!

Link to comment
Share on other sites

depends on what you mean by the start of the day. Using the date object you should be able to "force" a few params, like the day, date, month, and year, (by getting them from the date object) and then make a timestamp out of that by setting all the time parts to 0. or you can get info like this:http://www.w3schools.com/php/php_ref_date.asp

Link to comment
Share on other sites

haha, I forgot about that one. I'm so used to Javascript I keep forgetting how many functions PHP has! :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...