Date Timezone

Drupal core, by default, does all time zone handling based on an offset from Greenwich Mean Time (GMT), represented as the number of hours' difference (plus or minus) from GMT. For example, the offset -0400 is used for Eastern Daylight Time in the United States. This approach has several drawbacks, the most significant of which is in trying to account for Daylight Saving Time, as the offset will change. When the local time changes to Eastern Standard Time, the actual offset from GMT changes from -0400 to -0500, and the setting must be updated again.

The Date API comes with a module, Date Timezone, that alters the core behavior to use named time zones rather than hour offsets (for example, America/New York versus -0400). Therefore, Date API can account for Daylight Saving Time accurately in its calculations.

0 0

Post a comment