Index: branches/5.2.x/core/install/install_data.sql =================================================================== diff -u -N -r14981 -r14994 --- branches/5.2.x/core/install/install_data.sql (.../install_data.sql) (revision 14981) +++ branches/5.2.x/core/install/install_data.sql (.../install_data.sql) (revision 14994) @@ -948,7 +948,7 @@ INSERT INTO SearchConfig VALUES ('PortalUser', 'PortalUserId', -1, 0, 'lu_fielddesc_user_portaluserid', 'lu_field_portaluserid', 'In-Portal', 'la_text_user', 0, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); INSERT INTO SearchConfig VALUES ('PortalUser', 'Username', -1, 0, 'lu_fielddesc_user_login', 'lu_field_login', 'In-Portal', 'la_text_user', 1, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); INSERT INTO SearchConfig VALUES ('PortalUser', 'Password', -1, 0, 'lu_fielddesc_user_password', 'lu_field_password', 'In-Portal', 'la_text_user', 2, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('PortalUser', 'tz', -1, 0, 'lu_fielddesc_user_tz', 'lu_field_tz', 'In-Portal', 'la_text_user', 17, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('PortalUser', 'TimeZone', -1, 0, 'lu_fielddesc_user_tz', 'lu_field_tz', 'In-Portal', 'la_text_user', 17, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); INSERT INTO SearchConfig VALUES ('PortalUser', 'dob', -1, 0, 'lu_fielddesc_user_dob', 'lu_field_dob', 'In-Portal', 'la_text_user', 16, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); INSERT INTO SearchConfig VALUES ('PortalUser', 'Modified', -1, 0, 'lu_fielddesc_user_modified', 'lc_field_modified', 'In-Portal', 'la_text_user', 15, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); INSERT INTO SearchConfig VALUES ('PortalUser', 'Status', -1, 0, 'lu_fielddesc_user_status', 'lc_field_status', 'In-Portal', 'la_text_user', 14, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); Index: branches/5.2.x/core/units/helpers/user_helper.php =================================================================== diff -u -N -r14973 -r14994 --- branches/5.2.x/core/units/helpers/user_helper.php (.../user_helper.php) (revision 14973) +++ branches/5.2.x/core/units/helpers/user_helper.php (.../user_helper.php) (revision 14994) @@ -1,6 +1,6 @@ Application->RecallVar('UserGroups'); $this->Application->Session->SetField('GroupId', reset( explode(',', $groups) )); $this->Application->Session->SetField('GroupList', $groups); + $this->Application->Session->SetField('TimeZone', $object->GetDBField('TimeZone')); } $this->Application->LoadPersistentVars(); Index: branches/5.2.x/core/admin_templates/config/custom_variables.tpl =================================================================== diff -u -N -r14941 -r14994 --- branches/5.2.x/core/admin_templates/config/custom_variables.tpl (.../custom_variables.tpl) (revision 14941) +++ branches/5.2.x/core/admin_templates/config/custom_variables.tpl (.../custom_variables.tpl) (revision 14994) @@ -18,13 +18,11 @@ var $target = $( jq('#, #config[]') ); $target.hide().empty(); + $target.append(''); if ($timezone_group == '') { return ; } - else { - $target.append(''); - } for (var $i = 0; $i < $timezones[$timezone_group].length; $i++) { var $timezone = $timezones[$timezone_group][$i]; Index: branches/5.2.x/admin/system_presets/simple/users_u.php =================================================================== diff -u -N -r14975 -r14994 --- branches/5.2.x/admin/system_presets/simple/users_u.php (.../users_u.php) (revision 14975) +++ branches/5.2.x/admin/system_presets/simple/users_u.php (.../users_u.php) (revision 14994) @@ -71,7 +71,7 @@ $hidden_fields = Array ( /* 'PortalUserId', 'Username', 'Password', 'FirstName','LastName', 'Company', 'Email', 'CreatedOn', 'Phone', 'Fax', 'Street', 'Street2', 'City', 'State' , 'Zip', 'Country', 'ResourceId', 'Status', 'EmailVerified', - 'Modified', 'dob', 'tz',*/ 'IPAddress', /*'IsBanned', 'PwResetConfirm', 'PwRequestTime',*/ 'FrontLanguage', + 'Modified', 'dob',*/ 'TimeZone', 'IPAddress', /*'IsBanned', 'PwResetConfirm', 'PwRequestTime',*/ 'FrontLanguage', 'AdminLanguage', 'IPRestrictions', ); Index: branches/5.2.x/core/kernel/application.php =================================================================== diff -u -N -r14989 -r14994 --- branches/5.2.x/core/kernel/application.php (.../application.php) (revision 14989) +++ branches/5.2.x/core/kernel/application.php (.../application.php) (revision 14994) @@ -1,6 +1,6 @@ LoadPersistentVars(); } + + $user_timezone = $this->Session->GetField('TimeZone'); + + if ( $user_timezone ) { + putenv('TZ=' . $user_timezone); + } } /** Index: branches/5.2.x/core/install/install_schema.sql =================================================================== diff -u -N -r14978 -r14994 --- branches/5.2.x/core/install/install_schema.sql (.../install_schema.sql) (revision 14978) +++ branches/5.2.x/core/install/install_schema.sql (.../install_schema.sql) (revision 14994) @@ -265,7 +265,7 @@ EmailVerified tinyint(4) NOT NULL, Modified int(11) DEFAULT NULL, dob int(11) DEFAULT NULL, - tz int(11) DEFAULT NULL, + TimeZone varchar(255) NOT NULL DEFAULT '', IPAddress varchar(15) NOT NULL, IsBanned tinyint(1) NOT NULL DEFAULT '0', PwResetConfirm varchar(255) NOT NULL, @@ -360,7 +360,7 @@ IpAddress varchar(20) NOT NULL DEFAULT '0.0.0.0', `Status` int(11) NOT NULL DEFAULT '1', GroupList varchar(255) DEFAULT NULL, - tz int(11) DEFAULT NULL, + TimeZone varchar(255) NOT NULL, BrowserSignature varchar(32) NOT NULL DEFAULT '', PRIMARY KEY (SessionKey), KEY UserId (PortalUserId), Index: branches/5.2.x/core/units/users/users_config.php =================================================================== diff -u -N -r14973 -r14994 --- branches/5.2.x/core/units/users/users_config.php (.../users_config.php) (revision 14973) +++ branches/5.2.x/core/units/users/users_config.php (.../users_config.php) (revision 14994) @@ -1,6 +1,6 @@ Array ('formatter' => 'kDateFormatter', 'default' => NULL), 'dob' => Array ('formatter' => 'kDateFormatter', 'default' => NULL), - 'tz' => Array ('default' => NULL), + 'TimeZone' => Array ('default' => ''), 'IPAddress' => Array ('default' => ''), 'IsBanned' => Array ('default' => 0), 'PwResetConfirm' => Array ('default' => ''), @@ -544,7 +544,7 @@ 'Status' => Array ('type' => 'int', 'not_null' => 1), 'Modified' => Array ('type' => 'int'), 'dob' => Array ('type' => 'int'), - 'tz' => Array ('type' => 'int'), + 'TimeZone' => Array ('type' => 'string', 'not_null' => 1), 'IPAddress' => Array ('type' => 'string', 'not_null' => 1), 'IsBanned' => Array ('type' => 'int', 'not_null' => 1), 'PwResetConfirm' => Array ('type' => 'string', 'not_null' => 1), Index: branches/5.2.x/core/install/upgrades.sql =================================================================== diff -u -N -r14981 -r14994 --- branches/5.2.x/core/install/upgrades.sql (.../upgrades.sql) (revision 14981) +++ branches/5.2.x/core/install/upgrades.sql (.../upgrades.sql) (revision 14994) @@ -2525,3 +2525,10 @@ ADD RequireLogin TINYINT NOT NULL DEFAULT '0'; INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UpdateCountersOnFilterChange', '1', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_UpdateCountersOnFilterChange', 'checkbox', '', '', 10.15, 0, 0, NULL); + +ALTER TABLE UserSession CHANGE `tz` `TimeZone` VARCHAR(255) NOT NULL; +ALTER TABLE PortalUser CHANGE `tz` `TimeZone` VARCHAR(255) NOT NULL DEFAULT ''; + +UPDATE SearchConfig +SET FieldName = 'TimeZone' +WHERE FieldName = 'tz' AND TableName = 'PortalUser'; Index: branches/5.2.x/core/admin_templates/users/admins_edit.tpl =================================================================== diff -u -N -r14968 -r14994 --- branches/5.2.x/core/admin_templates/users/admins_edit.tpl (.../admins_edit.tpl) (revision 14968) +++ branches/5.2.x/core/admin_templates/users/admins_edit.tpl (.../admins_edit.tpl) (revision 14994) @@ -75,14 +75,15 @@ - + + Index: branches/5.2.x/core/admin_templates/incs/form_blocks.tpl =================================================================== diff -u -N -r14941 -r14994 --- branches/5.2.x/core/admin_templates/incs/form_blocks.tpl (.../form_blocks.tpl) (revision 14941) +++ branches/5.2.x/core/admin_templates/incs/form_blocks.tpl (.../form_blocks.tpl) (revision 14994) @@ -191,6 +191,90 @@ + + + + + + + +    + + + + + + Index: branches/5.2.x/core/admin_templates/users/users_edit.tpl =================================================================== diff -u -N -r14973 -r14994 --- branches/5.2.x/core/admin_templates/users/users_edit.tpl (.../users_edit.tpl) (revision 14973) +++ branches/5.2.x/core/admin_templates/users/users_edit.tpl (.../users_edit.tpl) (revision 14994) @@ -83,7 +83,7 @@ - + @@ -95,6 +95,7 @@ + Index: branches/5.2.x/core/install/english.lang =================================================================== diff -u -N -r14981 -r14994 --- branches/5.2.x/core/install/english.lang (.../english.lang) (revision 14981) +++ branches/5.2.x/core/install/english.lang (.../english.lang) (revision 14994) @@ -633,6 +633,7 @@ VGhvdXNhbmRzIFNlcGFyYXRvcg== VGltZSBGb3JtYXQ= VGltZW91dA== + VGltZSBab25l VGl0bGU= VG8= VG8gRS1tYWls