php[architect]: It’s About Time
On the php[architect] site they've shared an article from their December 2018 edition by Colin DeCarlo and issues with dates and times that most developers deal with at some point in their careers.
As applications scale and gain adoption, dates and time become much more of a concern than they once were. Bugs crop up, and developers start learning the woes of time zones and daylight saving time. Why did that reminder get sent a day early? How could that comment have been made at 5:30 a.m. if the post didn’t get published until 9:00 a.m.? Indiana has how man time zones?!Luckily, PHP developers have the tools they need to face these problems head-on and take back control of their apps.
The article covers some of the basics of "time" and some of the concepts that PHP uses to measure it. It then introduces the different time functionality that PHP offers including timestamps and functions like strtotime and date as well as the DateTime handling. They dig into this last one in more detail before talking about timezones and date arithmetic.
Comments are closed.