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

Problem with time representation in multilang environment with some locales

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not a bug
    • Affects Version/s: 1.8, 1.8.1, 1.8.2, 1.8.3, 1.8.4
    • Fix Version/s: None
    • Component/s: Language
    • Labels:
      None
    • Environment:
      All
    • Affected Branches:
      MOODLE_18_STABLE

      Description

      The problem:
      php's strftime uses locale information and %p (ante-meridian, post-meridian modifier) is setted to null in many locales,
      which is partially correct because it is not used on that locale.

      If you have a multilingual environment you still have one locale, in my case portuguese and we use 24h format, however
      there are pages written in english where the time representation uses %p, thus the effect is that time is represented in a
      12-hour format and with a blank for %p.

      Solution:
      Set a default if %p is empty.

        Attachments

          Activity

            People

            Assignee:
            skodak Petr Skoda
            Reporter:
            paulo.matos Paulo Matos
            Tester:
            Nobody
            Participants:
            Component watchers:
            cameron1729, David Mudrák (@mudrd8mz), Helen Foster
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: