I think the documentation regarding PHP time-related functions and time zones is a bit confusing.
This is extremely important if you have multiple servers across different countries, and you want to run all of them using UTC+0 without worrying about the particular time zone in which the server is located.
The alternative, of course, is calling ini_set('date.timezone', 'UTC'); at the very beginning.
The number of 86,400 seconds in a day comes from the assumption of 60 seconds per minute, 60 minutes per hour and 24 hours per day: 60*60*24. This edge case occurs on the days that clocks change as we enter and leave daylight savings (summer) time.
Date and time arithmetic is logically consistent and correct when you use PHP built-in functions, but it may not always work as expected if you try to write your own date and time arithmetic.
It is compatible with other time and other solar systems with different revolutions of the planets as well as different quantumy stuff.
Thanks: Here's one way to generate all intermediate dates (in my SQL format) between any 2 dates.
Get start and end dates from user input, you'd need to do the basic validations that : - start and end dates are valid dates - start date It is also worth noting: * For manipulating arbitrary format, or length timestamps, see the PEAR:: Date class.
* PHP 6 will be shipping a new inbuilt date and timestamp manipulation API.
A time difference function that outputs the time passed in facebook's style: 1 day ago, or 4 months ago.
I took andrew dot macrobert at gmail dot com function and tweaked it a bit.
On a strict enviroment it was throwing errors, plus I needed it to calculate the difference in time between a past date and a future date.