Skip to content
Tcl Source Code Artifact [beddfeb2b9]
Login

Artifact [beddfeb2b9]

Artifact beddfeb2b90087f7a8517690803fcaf3c7e6526bedf5179c8348db127b97cf7e:

Ticket change [beddfeb2b9] - Ticket [f2b5f89c0d8520ea|f2b5f89c0d] <i>clock scan of leapsecond: wrong result in 8.6 and 9.0</i> status still Open with 3 other changes by sebres on 2024-11-19 14:32:56.
D 2024-11-19T14:32:56.906
J icomment Again,\sthis\sISO\samendment\sonly\saffects\sthe\sinput\sside,\sthe\soutput\sof\sclock\sscan\sis\sand\sstill\sremains\sthe\sunix\stime,\swhat\ssimply\sdoesn't\sknow\sleap\ssecond,\sand\sso\sunable\sto\srepresent\sit\scorrectly\sat\sall.<br/>\r\nISO\scan\schange\ssomething\severy\syear,\sand\sone\scan\sand\sprobably\smust\sreflect\sit\son\sthe\sscanning\sof\sthe\sinput\sside,\sbut\snot\sif\sthe\sresult\sof\sconversion\sis\simpossible\sin\sprinciple.\r\n\r\nI\sdon't\sunderstand\swhy\syou\sprefer\sa\swrong\sresult\sto\sthe\simpossible\sresult\sin\scase\sof\s-validate\s1.\r\n\r\nValidity\sis\sbasically\sa\snew\smechanism\sto\scontrol\swhether\sthe\sinput\sis\scorrect,\sbut\salso\sand\sprobably\smore\simportant\sthat\sthe\sresult\sis\scorrect\sand\sthe\sinput\swas\sconverted\sproperly.\sAnd\sinitially\sI\simplemented\sit\sin\sthe\sway\sthat\sthe\sresult\swas\sconverted\sback\sand\scompared\swith\sinput\stokens\sand\svalidation\sfailed\sif\sthe\stokens\sdeviated\s(what\swould\shappen\sin\sthis\sparticular\scase)...\sLater\sI\sreimplemented\sit\smore\soptimal\sby\sdirect\scomparison,\sbut\sit\sshall\snot\schange\sthe\sprinciple\s-\sif\sback\sconversion\sgenerates\sdifferent\stokens\sthan\sinput,\sthe\ssimplest\smath\sdoesn't\swork\sand\sthe\svalidation\smust\sfail.\sIn\smy\sopinion\sthe\sleap\ssecond\sis\snot\ssuch\simportant\sthing,\sfor\swhich\swe\sshall\smake\sexceptions\sin\sthis\ssimple\smechanic.\r\n\r\nI\sguess,\sthere\sare\salso\sanother\scorner\scases\swhat\syour\sbranch\sdoesn't\sconsider\sat\sthe\smoment\sand\sthey\scould\sfail,\sfor\sinstance\sthe\scheck\sof\sthe\sscanned\sweekday\swould\sprobably\sfail\s(because\sof\sthe\sday\schange,\se.\sg.\sSat\sto\sSun):\r\n<code><pre\sstyle="padding-left:20pt">\r\n%\sclock\sscan\s"Sat\sJun\s30\s23:59:60\s2012"\s-gmt\s1\s-valid\s1\r\nunable\sto\sconvert\sinput\sstring:\sinvalid\sday\sof\sweek\r\n%\sclock\sscan\s"Sat\sJun\s30\s23:59:60\s2012"\s-format\s"%a\s%b\s%d\s%T\s%Y"\s-gmt\s1\s-valid\s1\r\nunable\sto\sconvert\sinput\sstring:\sinvalid\sday\sof\sweek\r\n</pre></code>\r\n(untested,\sbut\sI\sguess\sit\swill)\r\n\r\nIn\smy\sopinion,\sa\snote\sin\sthe\sdocumentation\slike\sthis\swould\sbe\sfully\senough:<br/>\r\n<i>Since\sleap\ssecond\sis\snot\srepresentable\sin\sthe\sresult\sof\sscan\s(unix\stime),\sscan\sof\stime\slike\s<code>23:59:60</code>\sis\sgenerally\simpossible\swith\s-valid\s1\s(default\sin\s9.0).</i><br/>\r\nThat's\sit.\sLet\salone\sthat\sall\sprogramming\slanguages\sdoing\sit\salso.\r\n\r\nHowever\sif\sthe\sdecision\swill\sbe\snevertheless\s"let\sit\sbe",\sI\swould\srecommend\sanother\svariant\sto\sfix\sit\s-\sfreeze\sthe\ssecond\sin\sthe\ssame\sdate:\se.\sg.\sif\sthe\sscanned\ssecond\sis\s60\sand\sdate\smatches\sleap\sconditions,\sdecrement\stime,\sso\swe'd\sremain\sin\sthe\ssame\sdate\sand\severy\svalidity\srules,\scovering\sdate\stokens\swould\sbe\scorrect.
J login sebres
J mimetype text/x-fossil-wiki
K f2b5f89c0d8520ea86b929daa19ec13fc3a24d2d
U sebres
Z 4bffd57d7900af4140daa1d35f398f41