In-Portal Issue Tracker

Welcome to the In-Portal Open Source CMS Issue Tracker! This is a central management / tracking tool for all types of tasks / issues / bugs for the In-Portal Project. Before reporting any issues, please make sure to read the Guide into Issue Tracker and How to Properly Test and Report Bugs!

Viewing Issue Simple Details Jump to Notes ] Wiki ] View Advanced ] Issue History ] Print ]
ID Category Type Reproducibility Date Submitted Last Update
0000743 [In-Portal CMS] Data Management bug report always 2010-05-23 10:43 2010-07-22 15:06
Reporter alex View Status public Project Name In-Portal CMS
Assigned To alex Developer
Priority normal Resolution fixed Fixed in Version 5.1.0-B1
Status closed Product Version 5.0.3 Target Version 5.1.0
Time EstimateNo estimate
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.
Additional Information
Tags No tags attached.
Reference http://groups.google.com/group/in-portal-dev/browse_thread/thread/3c25026fd813d18a
Change Log Message
Estimate Points 0
Attached Files patch file icon site_timezone_core.patch [^] (43,221 bytes) 2010-05-23 10:43 [Show Content]
patch file icon site_timezone_modules.patch [^] (2,450 bytes) 2010-05-23 10:43 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to 0000058closed (5.2.0)alex Add Timezone Field to User record 

-  Notes
User avatar (0002297)
alex (manager)
2010-05-23 10:44

Please make sure, that this will work on PHP4 too.
User avatar (0002304)
Dmitry (manager)
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();

?>
User avatar (0002305)
alex (manager)
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.
User avatar (0002309)
Dmitry (manager)
2010-05-24 11:32

Tested PHP4 with "safe_mode_allowed_env_vars" set to "TZ" - OK.

Please commit.
User avatar (0002312)
alex (manager)
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
User avatar (0002522)
alex (manager)
2010-07-22 15:06

Closing, since 5.1.0 release has been released.

- Related Changesets
In-Portal CMS: 5.1.x r13613
Timestamp: 2010-05-24 13:56:24
Author: alex
Details ] Diff ]
Fixes 0000743: Incorrect daylight time saving, when server timezone differs from site timezone
mod - /in-portal/branches/5.1.x/core/admin_templates/config/config_general.tpl Diff ] File ]
mod - /in-portal/branches/5.1.x/core/admin_templates/config/config_universal.tpl Diff ] File ]
add - /in-portal/branches/5.1.x/core/admin_templates/config/custom_variables.tpl File ]
mod - /in-portal/branches/5.1.x/core/admin_templates/incs/config_blocks.tpl Diff ] File ]
mod - /in-portal/branches/5.1.x/core/install/english.lang Diff ] File ]
mod - /in-portal/branches/5.1.x/core/install/incs/script.js Diff ] File ]
mod - /in-portal/branches/5.1.x/core/install/install_data.sql Diff ] File ]
mod - /in-portal/branches/5.1.x/core/install/step_templates/post_config.tpl Diff ] File ]
mod - /in-portal/branches/5.1.x/core/install/upgrades.sql Diff ] File ]
mod - /in-portal/branches/5.1.x/core/install.php Diff ] File ]
mod - /in-portal/branches/5.1.x/core/kernel/application.php Diff ] File ]
mod - /in-portal/branches/5.1.x/core/kernel/db/db_tag_processor.php Diff ] File ]
mod - /in-portal/branches/5.1.x/core/kernel/nparser/nparser.php Diff ] File ]
mod - /in-portal/branches/5.1.x/core/kernel/utility/formatters/date_formatter.php Diff ] File ]
mod - /in-portal/branches/5.1.x/core/kernel/utility/unit_config_reader.php Diff ] File ]
mod - /in-portal/branches/5.1.x/core/units/configuration/configuration_tag_processor.php Diff ] File ]
mod - /in-portal/branches/5.1.x/core/units/languages/languages_tag_processor.php Diff ] File ]

- 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



Web Development by Intechnic
In-Portal Open Source CMS
In-Portal Open Source CMS
Copyright © 2000 - 2009 MantisBT Group

Powered by Mantis Bugtracker