Moodle

DST changes not being applied on time

Details

  • Type: Sub-task Sub-task
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.9
  • Fix Version/s: STABLE backlog
  • Component/s: General
  • Labels:
    None
  • Environment:
    OS timezone = Europe/Madrid, Moodle server timezone = Australia/Perth
  • Affected Branches:
    MOODLE_19_STABLE

Description

Was playing with MDL-14093, and some days ago (last Sunday of March) I detected that DST changes, although finally are properly applied, they aren't changed on time.

In the related bug, experimenting with both Europe/Madrid and Australia/Perth times, they should have changed at 02:00 AM and 03:00 AM localtime respectively and I detected that:

1) Europe/Madrid was changed some (more than 1) hours before 02:00 AM (Madrid localtime)
2) Australia/Perth was changed some (more than 5) hours after 03:00 AM (Perth localtime)

I haven't researched more... but something is wrong about calculating when the DST must change. It seems that the server configuration (OS/Moodle) or so, affects the moment when DST are applied and that's wrong.

Ciao

Issue Links

Activity

Hide
Eloy Lafuente (stronk7) added a comment -

Adding some timezones/dsts people here...

Show
Eloy Lafuente (stronk7) added a comment - Adding some timezones/dsts people here...
Hide
Mathieu Petit-Clair added a comment -

Well, I don't know if it's the cause of this or not, but there are some problems in the way mktime works (see the not about the is_dst parameter on http://au2.php.net/mktime)... and I see on http://www.phpbuilder.com/columns/ehresman20030911.php3?page=4 (an interesting article, btw .. though it doesn't solve the DST problem) that when using gmmktime, it's better to put the default (-1) value for the last parameter, otherwise, we can get unexpected results.

In the next version, I hope we can convert this to use the proper timezone manipulation functions available in php > 5.1 ...

Show
Mathieu Petit-Clair added a comment - Well, I don't know if it's the cause of this or not, but there are some problems in the way mktime works (see the not about the is_dst parameter on http://au2.php.net/mktime)... and I see on http://www.phpbuilder.com/columns/ehresman20030911.php3?page=4 (an interesting article, btw .. though it doesn't solve the DST problem) that when using gmmktime, it's better to put the default (-1) value for the last parameter, otherwise, we can get unexpected results. In the next version, I hope we can convert this to use the proper timezone manipulation functions available in php > 5.1 ...

People

Vote (0)
Watch (3)

Dates

  • Created:
    Updated: