Difference between #27 and #28 of
i18n All-in-one format and timezone conversions for date, time, timestamp and datetime.

Revision #28 has been created by Gerhard Liebenberg on Mar 23, 2017, 9:22:26 PM with the memo:

typo corrected
« previous (#27)

Changes

Title unchanged

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

Category unchanged

How-tos

Yii version unchanged

Tags unchanged

i18n locale timezone UTC date time timestamp datetime

Content changed

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
--------------------------------------
[...]
6 0
13 followers
Viewed: 32 895 times
Version: 1.1
Category: How-tos
Written by: Gerhard Liebenberg
Last updated by: Gerhard Liebenberg
Created on: Sep 20, 2013
Last updated: 7 years ago
Update Article

Revisions

View all history