Esempio n. 1
0
 /**
  *
  * @return SS_Datetime
  */
 public function LastUpdated()
 {
     $created = $this->branch->getCommit()->getCommitterDate();
     // gitonomy sets the time to UTC, so now we set the timezone to
     // whatever PHP is set to (date.timezone). This will change in the future if each
     // deploynaut user has their own timezone
     $created->setTimezone(new DateTimeZone(date_default_timezone_get()));
     $d = new SS_Datetime();
     $d->setValue($created->format('Y-m-d H:i:s'));
     return $d;
 }
Esempio n. 2
0
 /**
  * @return SS_Datetime
  */
 public function LastUpdated()
 {
     if ($this->_lastUpdatedCache) {
         return $this->_lastUpdatedCache;
     }
     try {
         $created = $this->branch->getCommit()->getCommitterDate();
     } catch (Exception $e) {
         //occasionally parsing will fail this is a fallback to make it still work
         return new SS_Datetime();
     }
     $created->setTimezone(new DateTimeZone(date_default_timezone_get()));
     $date = SS_Datetime::create();
     $date->setValue($created->format('Y-m-d H:i:s'));
     $this->_lastUpdatedCache = $date;
     return $date;
 }
 /**
  * @return SS_Datetime
  */
 public function LastUpdated()
 {
     if ($this->_lastUpdatedCache) {
         return $this->_lastUpdatedCache;
     }
     try {
         $created = $this->branch->getCommit()->getCommitterDate();
     } catch (Exception $e) {
         //occasionally parsing will fail this is a fallback to make it still work
         return new SS_Datetime();
     }
     // gitonomy sets the time to UTC, so now we set the timezone to
     // whatever PHP is set to (date.timezone). This will change in the future if each
     // deploynaut user has their own timezone
     $created->setTimezone(new DateTimeZone(date_default_timezone_get()));
     $date = new SS_Datetime();
     $date->setValue($created->format('Y-m-d H:i:s'));
     $this->_lastUpdatedCache = $date;
     return $date;
 }