Skip to content
Tcl Source Code History Of Ticket cd25761979
Login

History Of Ticket cd25761979

Artifacts Associated With Ticket cd25761979

  1. Ticket change [6263d0a915] (rid 229573) by oehhar on 2024-07-25 12:52:45:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. comment initialized to:
      Ashok wrote the following message on the core list:
      
      <verbatim>
      % clock scan now
      1721803544
      % clock format now
      bad seconds "now": must be -now or integer
      % clock format -now
      </verbatim>
      
      The above seems incongruous to me, why -now for format and “now” for scan?
      
      Afaict, “-now” is really a value, not an option. And unlike options, it cannot appear at arbitrary points in the command, only in place of the time value.
      
      Is there a rationale for the difference? If no, is it too late to change for 9.0? If too late for compatibility reasons, can clock format and clock add treat “now” and “-now” as synonyms with latter deprecated? (With a TIP of course)
      
    5. foundin initialized to: "main"
    6. is_private initialized to: "0"
    7. login: "oehhar"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "0f366eb3e9e2fcab52b8ebacd197db9047186a5f"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "oehhar"
    14. subsystem initialized to: "16. Commands A-H"
    15. title initialized to: "clock command - "now" vs "-now""
    16. type initialized to: "Bug"
  2. Ticket change [631ace5738] (rid 229574) by oehhar on 2024-07-25 12:58:16:

    1. icomment:
      Ashok,
      great to find that.
      
      The TIP [https://core.tcl-lang.org/tips/doc/trunk/tip/688.md] only writes about "-now" not "now".
      
      Thanks for branch [b5e6612557] I am also with you, that just "now" looks nicer.
      
      Thank you,
      Harald
      
    2. login: "oehhar"
    3. mimetype: "text/x-fossil-wiki"
    4. username: "oehhar"
  3. Ticket change [2bedf6d09e] (rid 229583) by sebres on 2024-07-26 19:02:29:

    1. icomment:
      The new clock engine introduces new pseudo seconds value as quasi "option" `-now`, as a replacement for `[clock seconds]` supplied as a base.
      
      This is also described in the TIP.
      
      `clock scan now` is a free-scan form (without format) what was always able to parse "word" `now`... this has indirectly nothing to do with the `-now` "option" (which is normally applicable for `clock format` or `clock add`).
      
      `clock scan` always uses base `-now` by default, but it can be surely supplied with `-base` parameter additionally (although doesn't make sense, because as already said by default it is now):
      
      ```
      % clock scan "+1 month" -base -now
      1724623200
      % clock scan "+1 month"
      1724623200
      % clock scan "now +1 month"
      1724623200
      % clock scan "tomorrow +1 month"
      1724709600
      ```
      
      Just note that only free-scan form of `clock scan` accepts `now` (or `tomorrow` or whatever).
      
      Anyway both have nothing to do with each others (one is a base value to format, add etc, another is a user input to scan).
      
      <blockquote>> Afaict, “-now” is really a value, not an option.</blockquote>
      
      Well, matter of taste probably. One can consider it as an option so that then commands `clock add` and `clock format` don't need a value (value becomes optional in that case).
      
      However, I'm not against can to treat `now` and `-now` as synonyms (no idea it'd need a TIP again). But please without further deprecation of `-now`.
      
    2. login: "sebres"
    3. mimetype: "text/x-markdown"
  4. Ticket change [4db3239309] (rid 229584) by oehhar on 2024-07-27 12:25:12:

    1. icomment:
      Sergey,
      thank you for the explanation. That makes sense.
      
      I hope, I did not disturb you within your holidays...
      
      Thanks again,
      Harald
      
    2. login: "oehhar"
    3. mimetype: "text/x-fossil-wiki"
    4. username: "oehhar"
  5. Ticket change [12c3a2b47d] (rid 229585) by sbron on 2024-07-27 19:56:44:

    1. icomment:
      I have to disagree. It doesn't make sense. The `[clock format]` command takes one argument indicating which time value to format. Allowing some symbolic name to serve as a shorthand for the frequently used value `[clock seconds]` is useful. But that symbolic name still represents a value. So it should just be a simple symbolic name, like "now". It shouldn't be a "quasi" option that needs to be in a specific position and then disallows providing the value argument. (The statement that *value* becomes optional is not true. If both are provided, an error is thrown.)
      
      Why introduce such a complicated set of rules when it could suffice to say that "the word 'now' may be used for *timeVal* to mean the current time".
      
      So I definitely would say that "now" should at least be accepted in all the places where "-now" has recently been introduced. I also think that "-now" should be deprecated as soon as possible, because we should get rid of things that are not logical. In my opinion, "-now" deserves that qualification.
      
    2. login: "sbron"
    3. mimetype: "text/x-markdown"
  6. Ticket change [9c9b86e7eb] (rid 229586) by apnadkarni on 2024-07-28 16:48:34:

    1. icomment:
      I'm with Schelte on this one for exactly the reasons he described. It doesn't matter what the context for usage; in the user's mind it refers to current time and having to remember where to use "now" and where to use "-now" is unnecessary and confusing.
      
      
      If "-now" needs to be maintained as a synonym for some reason (compatibility with 9.0 beta releases?) we can just leave it undocumented.
      
    2. login: "apnadkarni"
    3. mimetype: "text/x-markdown"
  7. Ticket change [5e62e0bbde] (rid 229595) by sebres on 2024-07-28 19:52:15:

    1. closedate changed to: "2460520.32795339"
    2. closer changed to: "sebres"
    3. icomment:
      Fixed in [f602e32fc37910d1] for 8.7+, value <code>-now</code> retained to compat reasons to earlier versions and tclclockmod, but undocumented at the moment (excepting the TIP).
      
    4. login: "sebres"
    5. mimetype: "text/x-fossil-wiki"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"