public static function defaultTimezone($timezone = null)
 {
     if (is_null(self::$defaultTimezone)) {
         self::$defaultTimezone = self::getDefaultTimezone($timezone);
     }
     return self::$defaultTimezone;
 }
Beispiel #2
0
 /**
  * Returns the days between Start and Stop
  * @return int
  */
 public function getDaysBetween()
 {
     return $this->start->diff($this->end)->d;
 }
 protected function mk_entry($row)
 {
     if (is_null($row)) {
         return null;
     }
     $row = (array) $row;
     // Replace timestamps with DateTime objects
     foreach (array('created_at', 'updated_at') as $col) {
         $row[$col] = SimpleDateTime::fromGmtTimestamp($row[$col]);
     }
     return new CSM_JournalEntry($row);
 }