Esempio n. 1
0
 /**
  * Answer the local TimeZone
  * 
  * @return object Duration
  * @access public
  * @static
  * @since 5/3/05
  */
 static function localTimeZone()
 {
     $tzAbbreviation = date('T');
     $tzOffset = date('Z');
     if ($tzAbbreviation && $tzOffset) {
         $obj = TimeZone::offsetNameAbbreviation(Duration::withSeconds($tzOffset), $tzAbbreviation, $tzAbbreviation);
     } else {
         $obj = TimeZone::defaultTimeZone();
     }
     return $obj;
 }