<i>clock scan of leapsecond: wrong result in 8.6 and 9.0</i> status still Open with 3 other changes
by
.
D 2024-11-22T13:48:14.835
J icomment >\sAnd\sI\sdon't\sstop\sto\sask\syou,\swhy\syou\sare\sin\smode\sto\scontinue\sto\sprefer\sa\sfalse\sresult\sto\sno\sresult\s(or\seven\sto\sright\sresult,\slike\sin\smy\sbranch)?\r\n\r\nThere\sis\sno\s'right'\sanswer\shere.\sReturning\s1341100799\sis\sas\swrong\sas\s1341100800.\sWhat\sUNIX\sdoes\sis\ssmearing\sout,\sso\swe\scould\smap\s23:59:59\sto\s1341100799,\s23:59:60\sto\s1341100799.5\sand\s00:00:00\s(next\sday)\sto\s1341100800.\sBut\swe\scurrently\sdon't\ssupport\sfractions,\sso\swe\shave\sto\sround\sdown\s(your\spropsal)\sor\sup\s(my\sproposal,\sand\scurrent\sTcl\s8.x\sbehavior).\sReturning\sa\sdifferent\stimestamp\sfor\s-valid\s1\sand\s-valid\s0\sis\snot\slogical:\s-valid\sshould\sonly\sinfluence\sthe\svalidation,\snothing\selse.\r\n\r\nThe\schallenge\sis\sproviding\sa\sconsistent\sbehavior.\sI'm\sdoing\sthat\sby\sassuming\sa\ssecond\svalue\sof\s"60"\sto\sbe\svalid\sunless\sthe\stime\sstring\scontains\ssomething\swhich\sdisallows\sthis.\sSuch\sas\sa\sdate\swhich\sis\snot\sjan\s1,\sjune\s30,\sjuly\s1\sor\sdec\s31.\sOr\swhen\sthe\s(minute\s%\s15)\s!=\s14.\sOr\s(recently)\swhen\sthe\syear\sis\s<\s1972\sor\s>\s2017.\r\n\r\n<pre>\r\n%\sclock\sscan\s"23:59:59"\r\n1732316399\r\n%\sclock\sscan\s"23:59:60"\r\n1732316400\r\n%\sclock\sscan\s"00:00:00\stomorrow"\r\n1732316400\r\n</pre>\r\n\r\nThis\smakes\s100%\ssense\sto\sme,\seven\sthough\sI\sknow\stoday\swe\sdon't\shave\sa\sleap-second.
J login jan.nijtmans
J mimetype text/x-fossil-wiki
K f2b5f89c0d8520ea86b929daa19ec13fc3a24d2d
U jan.nijtmans
Z cf83f7d0d1848fc3c4413ab7ea16be5a