INGInious icon indicating copy to clipboard operation
INGInious copied to clipboard

Support for timezones and time localization

Open anthonygego opened this issue 6 months ago • 0 comments

This PR cancels #985 and obsoletes #988 with a simpler implementation. This PR:

  • re-bundles moment.js with locales to provide localized date time pickers. They were not and defaulted to American English until now, showing Sunday as the first day of the week. This allows to provide date time pickers with support for timezones
  • makes AccessibleTime timezone-aware. The new format is True|False|<ISODate>/<ISODate>[/<ISODate>] and is retrocomptaible with the older one. In that case, and when it is not specified, the timezone is considered to be the server local timezone.
  • Allows the user to select their timezone in the user settings pane.
  • Enables timezone awareness on the submission collections and on the associated aggrgation pipelines, to make stats based on the end-user timezone.
  • Embeds all dates in <time /> tags in order to process them automatically with the Intl Javacript builtins and show localized date and time when the page is loaded.
  • Adds support for a :time: tag that takes an ISO date in argument in ParsableText and will be formatted using the same principle.
  • Refactors the task accessibility edition code to remove redundancy and allow localized date printing instead of ISODate format.
  • Updates existing submissions dates in database to UTC, considering the local server timezone as the one the information were recorded with.

anthonygego avatar May 23 '25 15:05 anthonygego