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

'Available until' date always uses server time zone (prior to 2.2)

    XMLWordPrintable

Details

    • Any
    • MOODLE_21_STABLE
    • MOODLE_21_STABLE
    • Hide

      1. Set the Moodle timezone option $CFG->timezone to a timezone which is different from the server timezone. Enable availability if not already done.

      2. Edit an activity and set its end date to e.g. 14 January.

      3. Look at the database table and obtain the Unix time corresponding to this end date.

      4. Convert this to a real time e.g. using www.epochconverter.com

      Verify that this time is the same as 14 January 23:59 in the selected time zone, and not in the server's time zone.

      Known issue: On a DST crossover day the result will be slightly incorrect (by one hour). This is probably preferable to being always incorrect, and possibly by multiple hours, on servers which have a time zone configured.

      Show
      1. Set the Moodle timezone option $CFG->timezone to a timezone which is different from the server timezone. Enable availability if not already done. 2. Edit an activity and set its end date to e.g. 14 January. 3. Look at the database table and obtain the Unix time corresponding to this end date. 4. Convert this to a real time e.g. using www.epochconverter.com Verify that this time is the same as 14 January 23:59 in the selected time zone, and not in the server's time zone. Known issue: On a DST crossover day the result will be slightly incorrect (by one hour). This is probably preferable to being always incorrect, and possibly by multiple hours, on servers which have a time zone configured.

    Description

      When completion tracking is on you have a setting within the assignment called restrict access. You can set for the when assignment will be available until. This setting only allows you to pick a day and not a time.

      When site and user are set to eastern time to assignment becomes restricted at "to 19 January 2012"
      When you have the time zone set to central it says "to 19 January 2012, 10:59 PM"

      When you have the time zone set to mountain time "to 19January 2012, 09:59 PM"

      You would think that the setting would adjust depending on the time zone and not adjust back one hour with the timezone setting.

      This restrict setting overrides the quiz close time so if the teacher is using the restrict time then they would not be able to close the quiz on 11:59 but it would be forced to close on 10:59 no matter if the quiz settings are set to later.

      Tested on
      UTC-6
      UTC-5
      American/Chicago
      America/New_York
      Anerica/Denver

      Attachments

        Issue Links

          Activity

            People

              quen Sam Marshall
              sgorsuch Scott Gorsuch
              Jason Fowler Jason Fowler
              Aparup Banerjee Aparup Banerjee
              Adrian Greeve Adrian Greeve
              Amaia Anabitarte, Carlos Escobedo, Laurent David, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                12/Mar/12