Skip to content
Tcl Source Code History Of Ticket 958bc05fbe
Login

History Of Ticket 958bc05fbe

Artifacts Associated With Ticket 958bc05fbe

  1. Ticket change [9033833640] (rid 138086) by Martin0815 on 2014-05-13 07:45:45:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/html"
    4. comment initialized to:
      <h3>Bug</h3>
      
      The bug is, that the <code>%r</code> (AM/PM) clock format result contains seconds, while the format result with <code>%R</code> does <strong>not</strong> contain seconds.
      
      <h3>Excerpt from the docs:</h3>
      
      <blockquote>
      <dl>
      <dt>%r</dt>
      <dd>On output, produces a locale-dependent time of day representation on a 12-hour clock. On input, accepts whatever %r produces.</dd>
      <dt>%R</dt>
      <dd>On output, produces a locale-dependent time of day representation on a 24-hour clock. On input, accepts whatever %R produces.</dd>
      </dl>
      </blockquote>
      
      <h3>Example code:</h3>
      
      <pre><code>
          % info patch
          8.6.1
          % set secs 986140861
          986140861
          % clock format $secs -format %R
          18:01
          % clock format $secs -format %r
          06:01:01 pm
      </code></pre>
      
    5. foundin initialized to: "8.6.1"
    6. is_private initialized to: "0"
    7. login: "Martin0815"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "be10c68edb35fa3f93c8cac6f2c0d27dc3933920"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "Martin0815"
    14. subsystem initialized to: "16. Commands A-H"
    15. title initialized to: ""clock format" with "%R" and "%r" mismatch"
    16. type initialized to: "Bug"
  2. Ticket change [0f49800e7d] (rid 138090) by jan.nijtmans on 2014-05-13 11:21:55:

    1. assignee changed to: "jan.nijtmans"
    2. closedate changed to: "2456790.97356318"
    3. closer changed to: "jan.nijtmans"
    4. icomment:
      Since Tcl's implementation corresponds with UNIX's strftime() function:
      
      [http://man7.org/linux/man-pages/man3/strftime.3.html]
      
             %r     The time in a.m. or p.m. notation.  In the POSIX locale this
                    is equivalent to %I:%M:%S %p.  (SU)
      
             %R     The time in 24-hour notation (%H:%M).  (SU) For a version
                    including the seconds, see %T below.
      
      So, this is merely a documentation bug than an implementation bug. Fixed now.
      
      Thanks!
      
    5. login: "jan.nijtmans"
    6. mimetype: "text/x-fossil-wiki"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"