Ticket UUID: | cd25761979da7be2861f124c41956cb0f9945ca4 | |||
Title: | clock command - "now" vs "-now" | |||
Type: | Bug | Version: | main | |
Submitter: | oehhar | Created on: | 2024-07-25 12:52:45 | |
Subsystem: | 16. Commands A-H | Assigned To: | nobody | |
Priority: | 5 Medium | Severity: | Minor | |
Status: | Closed | Last Modified: | 2024-07-28 19:52:15 | |
Resolution: | Fixed | Closed By: | sebres | |
Closed on: | 2024-07-28 19:52:15 | |||
Description: |
Ashok wrote the following message on the core list: % clock scan now 1721803544 % clock format now bad seconds "now": must be -now or integer % clock format -now 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) | |||
User Comments: |
sebres added on 2024-07-28 19:52:15:
Fixed in [f602e32fc37910d1] for 8.7+, value apnadkarni added on 2024-07-28 16:48:34: 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. sbron added on 2024-07-27 19:56:44: I have to disagree. It doesn't make sense. The 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. oehhar added on 2024-07-27 12:25:12: Sergey, thank you for the explanation. That makes sense. I hope, I did not disturb you within your holidays... Thanks again, Harald sebres added on 2024-07-26 19:02:29: The new clock engine introduces new pseudo seconds value as quasi "option" This is also described in the TIP.
Just note that only free-scan form of 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). > Afaict, “-now” is really a value, not an option. Well, matter of taste probably. One can consider it as an option so that then commands However, I'm not against can to treat oehhar added on 2024-07-25 12:58:16: 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 |
