protected function setPhotoValues() { $values = $this->getUIValues(); // turns the date back into UTC $photo_date = new SwatDate($values['photo_date']); $photo_date->setTZById($this->photo->photo_time_zone); $photo_date->toUTC(); $this->photo->title = $values['title']; $this->photo->description = $values['description']; $this->photo->photo_date = $photo_date; $this->photo->private = $values['private']; $this->photo->for_sale = $values['for_sale']; $this->photo->photo_time_zone = $values['photo_time_zone']; $this->photo->setStatus($values['status']); if ($this->ui->getWidget('comment_status_field')->visible) { $this->photo->comment_status = $values['comment_status']; } if ($this->photo->photo_time_zone === null) { $this->photo->photo_time_zone = $this->app->default_time_zone->getName(); } }