Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-14093

DST not applied properly when requesting explicit timezones

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 1.8.5, 1.9.1
    • 1.8.4, 1.9
    • General, Libraries
    • None
    • Any, with timezones loaded...
    • MOODLE_18_STABLE, MOODLE_19_STABLE
    • MOODLE_18_STABLE, MOODLE_19_STABLE

    Description

      Some days ago, with MDL-13959 , we fixed the usergetdate() to work properly with timezones passed as parameters, because DSTs weren't being properly calculated then. The solution was about to "save" the parameter value and then pass it straight to the dst_offset_on() function. Else, the original parameter became transformed and DST weren't applied.

      The same behaviour can be extended to other moodlelib functions:

      make_timestamp()
      userdate()
      usergetmidnight()

      All them can accept one timezone parameter and, if used, DST aren't properly applied.

      IMPORTANT NOTE: This doesn't affect normal Moodle operations, where the DST to be applied is calculated by looking server and user timezones. This ONLY affects it we want to know the time in another timezone (imagine one block showing different times or something like that).

      So those functions should be patched with a similar solution that the one used for usergetdate() in MDL-13959.

      Attachments

        Issue Links

          Activity

            People

              stronk7 Eloy Lafuente (stronk7)
              stronk7 Eloy Lafuente (stronk7)
              Mathieu Petit-Clair Mathieu Petit-Clair
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Clockify

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.