Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-10367

Date formatting of %A is incorrect

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.1.2
    • Fix Version/s: Unscheduled
    • Component/s: Core CiviCRM
    • Labels:
      None
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)

      Description

      The "Date Settings" page states that "Settings use standard POSIX specifiers." However, the current (4.1.2) handling of the %A format token is incorrect according to that statement. The current implementation uses %A as an alias of %P, and displays uppercase Ante meridiem and Post meridiem. This is the behavior of the PHP date() function, but is inconsistent with the POSIX standard, which states that %A should be a full textual representation of the day (eg. "Monday"). Additionally, the POSIX standard actually states that %p should display uppercase AM or PM, and %P display lowercase am or pm (odd, I know).

      I have attached a patch for the particular case of %A, but you will want to do a broader audit of other replacements as well, making sure you are consistently standardized on either PHP date() tokens or POSIX standard tokens, as they are sadly not the same, and make sure the documentation and help text correctly reflects your choice.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tonyyarusso Tony Yarusso
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 2 hours
                2h
                Remaining:
                Remaining Estimate - 2 hours
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified