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

POLICY: Support for %k and %l datetime conversion specifiers

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.9
    • None
    • Libraries
    • MOODLE_29_STABLE

    Description

      While working on MDL-49974 It was observed that %l is not supported and unit test was failing because of it.
      Also %P is supported which means lowercase in linux and uppercase in windows.
      http://php.net/manual/en/function.strftime.php
      https://msdn.microsoft.com/en-us/library/fe06s4ak.aspx

      stronk7 suggested,
      A) If we want to allow %k, %l and other non-zero formatters... then we'll need to hack timestamp_to_date_string() badly with hacks like the $fixday and $fixhour ones.
      B) If we don't want to allow those formatters... then IMO it would be great to ban them officially (docs required). An surely that same function can be also a good place to, with debugging enabled, perform a simple regexp looking for invalid ones and to warn about them.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rajeshtaneja Rajesh Taneja
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: