Before using any date related functions in PHP or Zend Framework,
first make certain your application has a correct default timezone, by either setting
the TZ environment variable, using the date.timezone
php.ini setting, or using date_default_timezone_set().
In PHP, we can adjust all date and time related functions to work for
a particular user by setting a default timezone according to the user's expectations.
For a complete list of timezone settings, see the CLDR
Timezone Identifier List.
Example 158. Setting a Default Timezone
<?php
// timezone for an American in California
date_default_timezone_set('America/Los_Angeles');
// timezone for a German in Germany
date_default_timezone_set('Europe/Berlin');
When creating Zend_Date instances, their timezone will
automatically become the current default timezone! Thus, the timezone setting
will account for any Daylight Savings Time (DST) in effect,
eliminating the need to explicitly specify DST.
Keep in mind that the timezones UTC and
GMT do not include Daylight Saving Time. This
means that even if you define per hand that Zend_Date should work
with DST, it would automatically be switched back for the instances
of Zend_Date which have been set to UTC or
GMT.




