i18n All-in-one format and timezone conversions for date, time, timestamp and datetime.

Comparing #27 with #28

Revision #28 was created by Gerhard Liebenberg Gerhard Liebenberg on Mar 23, 2017, 9:22:26 PM.

typo corrected

Content

Countries sometimes change their laws pertaining to time zones and daylight saving times. This means that GMT+2 can be a different local time this August compared to last August! It could even be a different date!
 
 
However, by using php's DateTime class (instead of timestamps), we can do both "format" and "time zone" conversions on a single DateTime object (only 2 lines of code) for date, time, timestamp and datetime types - while php takes care of nightmares such as current and historical time zones and daylight saving times.

(Php uses the IANA/Olson time zone database.)

Background reading for newbies like me
--------------------------------------
[...]