Difference between #1 and #2 of
Behaviour for Time Zone and Format conversion for Date, Time, timestamp, and datetime

Revision #2 has been created by Smithesh on Sep 4, 2015, 9:38:31 AM with the memo:

Removed extra doller symbol,
« previous (#1)

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));
[...]
2 0
3 followers
Viewed: 22 525 times
Version: 1.1
Category: How-tos
Written by: Smithesh
Last updated by: Smithesh
Created on: Sep 26, 2014
Last updated: 9 years ago
Update Article

Revisions

View all history