Index: core/admin_templates/users/admins_edit.tpl
===================================================================
--- core/admin_templates/users/admins_edit.tpl (revision 14988)
+++ core/admin_templates/users/admins_edit.tpl (working copy)
@@ -75,7 +75,7 @@
-
+
@@ -83,6 +83,7 @@
+
Index: core/admin_templates/users/users_edit.tpl
===================================================================
--- core/admin_templates/users/users_edit.tpl (revision 14988)
+++ core/admin_templates/users/users_edit.tpl (working copy)
@@ -83,7 +83,7 @@
-
+
@@ -95,6 +95,7 @@
+
Index: core/install/english.lang
===================================================================
--- core/install/english.lang (revision 14988)
+++ core/install/english.lang (working copy)
@@ -633,6 +633,7 @@
VGhvdXNhbmRzIFNlcGFyYXRvcg==
VGltZSBGb3JtYXQ=
VGltZW91dA==
+ VGltZSBab25l
VGl0bGU=
VG8=
VG8gRS1tYWls
Index: core/install/install_data.sql
===================================================================
--- core/install/install_data.sql (revision 14988)
+++ core/install/install_data.sql (working copy)
@@ -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: core/install/install_schema.sql
===================================================================
--- core/install/install_schema.sql (revision 14988)
+++ core/install/install_schema.sql (working copy)
@@ -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: core/install/upgrades.sql
===================================================================
--- core/install/upgrades.sql (revision 14988)
+++ core/install/upgrades.sql (working copy)
@@ -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: core/kernel/application.php
===================================================================
--- core/kernel/application.php (revision 14989)
+++ core/kernel/application.php (working copy)
@@ -1735,6 +1735,12 @@
// normal users + root
$this->LoadPersistentVars();
}
+
+ $user_timezone = $this->Session->GetField('TimeZone');
+
+ if ( $user_timezone ) {
+ putenv('TZ=' . $user_timezone);
+ }
}
/**
Index: core/units/helpers/user_helper.php
===================================================================
--- core/units/helpers/user_helper.php (revision 14988)
+++ core/units/helpers/user_helper.php (working copy)
@@ -163,6 +163,7 @@
$groups = $this->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: core/units/users/users_config.php
===================================================================
--- core/units/users/users_config.php (revision 14988)
+++ core/units/users/users_config.php (working copy)
@@ -384,7 +384,7 @@
),
'Modified' => 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),
|