Changes
Title
unchanged
Behaviour for Time Zone and Format conversion for Date, Time, timestamp, and datetime
Category
unchanged
How-tos
Yii version
unchanged
Tags
unchanged
timezone, date, timestamp, time, datetime, i18n locale timezone UTC date time timestamp datetime
Content
changed
[...]
$event->sender->$columnName = date("Y-m-d H:i:s");
}
$col_data = date("d-m-Y H:i:s", strtotime($event->sender->$columnName));
$datetime_object = DateTime::createFromFormat($this->php_user_datetime, $col_data, new DateTimeZone($this->user_timezone));
$datetime_object->setTimeZone(new
DateTimeZone($$this->edtTimeZone));
$event->sender->$columnName =
$datetime_object->format($this->php_db_datetime);
}
} else if ($column->dbType == 'time') {
$datetime_object = DateTime::createFromFormat($this->php_user_time, $event->sender->$columnName, new DateTimeZone($this->user_timezone));[...]