In-Portal Issue Tracker - In-Portal CMS
|
Viewing Issue Advanced Details |
|
ID:
|
Category:
|
Type:
|
Reproducibility:
|
Date Submitted:
|
Last Update:
|
743 |
[In-Portal CMS] Data Management |
bug report |
always |
2010-05-23 10:43 |
2010-07-22 15:06 |
|
Reporter:
|
alex |
Platform:
|
|
|
Assigned To:
|
alex |
OS:
|
|
|
Priority:
|
normal |
OS Version:
|
|
|
Status:
|
closed |
Product Version:
|
5.0.3 |
|
Product Build:
|
|
Resolution:
|
fixed |
|
|
ETA:
|
none |
Fixed in Version:
|
5.1.0-B1 |
|
Reference:
|
http://groups.google.com/group/in-portal-dev/browse_thread/thread/3c25026fd813d18a |
Change Log Message:
|
|
Estimate Points:
|
0 |
|
Summary:
|
0000743: Incorrect daylight time saving, when server timezone differs from site timezone |
Description:
|
In most cases web-server is physically located in same timezone as website, that is hosted on it. However there are some cases, when they differ.
To overcome that we have 2 settings in configuration:
* timezone of server
* timezone of website
When they differ we add difference before date is displayed and remove difference before date is saved to database. This method however doesn't process case when daylight saving settings differ from website to server.
Since there was no other way to do that in PHP4 it's developed as is.
PHP5 offers more control over daylight saving settings via date_default_timezone_set function, that allows to set both website timezone and daylight saving settings in one call like this:
date_default_timezone_set('Europe/Moscow');
We just need to set it during script initialization and no more need to trick timestamps before saving/displaying them.
At the end we will have list of supported timezones (see http://lv.php.net/manual/en/timezones.php) instead of 2 current configuration variables.
Also code putenv('TZ=Europe/Moscow'); will work for PHP4. |
Steps To Reproduce:
|
|
Additional Information:
|
|
Relationships | related to | 0000058 | closed (5.2.0) | alex | Add Timezone Field to User record |
|
Attached Files:
|
site_timezone_core.patch (43,221) 2010-05-23 10:43 http://tracker.in-portal.org/file_download.php?file_id=582&type=bug site_timezone_modules.patch (2,450) 2010-05-23 10:43 http://tracker.in-portal.org/file_download.php?file_id=583&type=bug |
|
Issue History |
Date Modified |
Username |
Field |
Change |
2010-09-06 05:35 |
alex |
Relationship added |
related to 0000058 |
2010-07-22 15:06 |
alex |
Note Added: 0002522 |
|
2010-07-22 15:06 |
alex |
Status |
resolved => closed |
2010-05-24 13:56 |
alex |
Note Added: 0002312 |
|
2010-05-24 13:56 |
alex |
Status |
reviewed and tested => resolved |
2010-05-24 13:56 |
alex |
Fixed in Version |
=> 5.1.0-B1 |
2010-05-24 13:56 |
alex |
Resolution |
open => fixed |
2010-05-24 13:56 |
alex |
Changeset attached |
5.1.x r13613 |
2010-05-24 13:53 |
alex |
Changeset attached |
5.1.x r13612 |
2010-05-24 13:52 |
alex |
Target Version |
5.1.0-B1 => 5.1.0 |
2010-05-24 11:35 |
alex |
Developer |
Dmitry => alex |
2010-05-24 11:32 |
Dmitry |
Note Added: 0002309 |
|
2010-05-24 11:32 |
Dmitry |
Assigned To |
!COMMUNITY => alex |
2010-05-24 11:32 |
Dmitry |
Status |
needs testing => reviewed and tested |
2010-05-24 11:32 |
Dmitry |
Assigned To |
alex => !COMMUNITY |
2010-05-24 11:32 |
Dmitry |
Developer |
alex => Dmitry |
2010-05-24 11:32 |
Dmitry |
Status |
needs work => needs testing |
2010-05-24 02:37 |
alex |
Issue Monitored: Dmitry |
|
2010-05-24 02:37 |
alex |
Note Added: 0002305 |
|
2010-05-23 23:44 |
Dmitry |
Note Added: 0002304 |
|
2010-05-23 23:44 |
Dmitry |
Assigned To |
!COMMUNITY => alex |
2010-05-23 23:44 |
Dmitry |
Status |
needs testing => needs work |
2010-05-23 10:44 |
alex |
Note Added: 0002297 |
|
2010-05-23 10:44 |
alex |
Assigned To |
=> !COMMUNITY |
2010-05-23 10:44 |
alex |
Developer |
=> alex |
2010-05-23 10:44 |
alex |
Status |
active => needs testing |
2010-05-23 10:43 |
alex |
File Added: site_timezone_modules.patch |
|
2010-05-23 10:43 |
alex |
New Issue |
|
2010-05-23 10:43 |
alex |
File Added: site_timezone_core.patch |
|
2010-05-23 10:43 |
alex |
Reference |
=> http://groups.google.com/group/in-portal-dev/browse_thread/thread/3c25026fd813d18a |
Notes |
|
(0002297)
|
alex
|
2010-05-23 10:44
|
|
Please make sure, that this will work on PHP4 too. |
|
|
(0002304)
|
Dmitry
|
2010-05-23 23:44
|
|
1. Tested OK on PHP5
2. Failed on PHP4 (PHP Version 4.3.9) - do we need to have Safe_mode OFF? I din't think "putenv" worked at all there.
Let's run a simple tests like:
<?php
putenv('TZ=Europe/Moscow');
phpinfo();
?>
|
|
|
(0002305)
|
alex
|
2010-05-24 02:37
|
|
Reminder sent to: Dmitry On "putenv" documentation page (http://lv.php.net/manual/en/function.putenv.php) is written, that it will only work in safe mode.
I have safe mode off in PHP5 and it works, that's odd.
I suppose (see documentation) we must have "safe_mode_allowed_env_vars" set to at least "TZ" for my code to work.
If this will help, then it will be requirement to run this feature on PHP4. |
|
|
(0002309)
|
Dmitry
|
2010-05-24 11:32
|
|
Tested PHP4 with "safe_mode_allowed_env_vars" set to "TZ" - OK.
Please commit. |
|
|
(0002312)
|
alex
|
2010-05-24 13:56
|
|
Fix committed to 5.1.x branch. Commit Message:
Fixes 0000743: Incorrect daylight time saving, when server timezone differs from site timezone |
|
|
(0002522)
|
alex
|
2010-07-22 15:06
|
|
Closing, since 5.1.0 release has been released. |
|