Skip to content
Tcl Source Code Artifact [18170cea48]
Login

Artifact [18170cea48]

Artifact 18170cea48b4e42142900732e455f2206001a9376a35b7e44707556bd871304a:

Ticket change [18170cea48] - New ticket [af3ebc5fafe0097c|af3ebc5faf] <i>clock scan and clock add bugs in error cases / with abbreviated options</i>. by pointsman on 2023-05-22 11:57:25.
D 2023-05-22T11:57:25.196
J assignee nobody
J closer nobody
J cmimetype text/x-fossil-plain
J comment The\sclock\scommand\s-\sas\sthe\sother\score\scommands\s-\ssupports\sabbreviated\soptions.\sDue\sto\sdeficiencies\sin\sthe\sTcl\scode\sin\slibrary/clock.tcl\sthis\sdoes\snot\swork\sas\sexpected\sin\ssome\serror\scases.\r\n\r\nExample\r\n\r\nclock\sscan\s1970-01-01\s-format\s%Y-%m-%d\s-gmt\strue\s-timezone\s:Europe/Berlin\r\n\r\n==>\scannot\suse\s-gmt\sand\s-timezone\sin\ssame\scall\r\n\r\nas\sthe\sdocumentation\ssay\sand\sis\sexpected.\sThough\r\n\r\nclock\sscan\s1970-01-01\s-format\s%Y-%m-%d\s-g\strue\s-timezone\s:Europe/Berlin\r\n\r\n==>\s0\r\n\r\nreturns\sa\sresult\swithout\serror.\r\n\r\nLooking\sat\s\r\n[https://core.tcl-lang.org/tcl/file?udc=1&ln=1209-1242&ci=586f490293ce298c&name=library%2Fclock.tcl]\s(thats\sfrom\score-8-6-branch,\sany\slater\sup\sto\strunk\shas\sthe\ssame\scode)\sit\sis\spretty\sclear\swhat\shappens.\sIn\sthe\sforeach\sloop\sthe\soption\sas\sgiven\s(even\sin\sabbreviated\sform)\sis\sused\sas\skey\sbut\sthe\stests\slater\son\stest\sonly\sfor\sthe\sfull\soption\sname.\r\n\r\nOther\sexamples\sof\serroneous\soption\sprocessing\sthan\sthe\sexample\sabove\scan\seasily\sfound\swith\sthis\sobservation.\r\n\r\nWith\sthe\sclock\sadd\scommand\sit\sis\seven\sa\sbit\sworser.\sLook\sat\r\n\r\n[https://core.tcl-lang.org/tcl/file?udc=1&ln=4240-4288&ci=586f490293ce298c&name=library%2Fclock.tcl]\r\n\r\nIn\sthe\spart\sfollowing\sthe\scomment\s"#\sCheck\soptions\sfor\svalidity"\sthe\sexistence\sof\ssaw(-gmt)\sand\ssaw(-timezone)\sis\stested\sbut\sthe\ssaw\sarray\sisn't\sset\sin\sany\scase\sby\sthe\scode\sabove\s-\sthe\stest\swill\snever\sfire.
J foundin 8.6\s-\s9.0
J is_private 0
J login pointsman
J priority 5\sMedium
J private_contact 4ca203a8e925aecdd9419645f936bccf18cd6ea7
J resolution None
J severity Minor
J status Open
J submitter pointsman
J subsystem 16.\sCommands\sA-H
J title clock\sscan\sand\sclock\sadd\sbugs\sin\serror\scases\s/\swith\sabbreviated\soptions
J type Bug
K af3ebc5fafe0097cb93f0304cd4b7676831a706e
U pointsman
Z f715bbf09c555c447fc44f8129e6e69d