<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-21T22:09:29.726
J icomment This\swas\smy\sfirst\sassumption\stoo,\sbut\sit\swas\sbased\son:\r\n\r\n\s\s*\s\sthe\scomplexity\s(or\srather\sthe\srelation\sbetween\sthe\scomplexity\sand\sneeds\sof\ssuch\sscan)\r\n\s\s*\s\sthe\seffort\sto\simplement\sit\sproperly,\sas\sit\swere,\sto\scomply\sthe\sISO\s8601\sand\sOS\sbehaviour\s(freeze\sthe\ssecond)\sat\sthe\ssame\stime;\r\n\s\s*\s\sthe\scommon\ssense\son\stop\s(leap\sseconds\sis\snot\sreally\srepresentable\sin\sresult\sof\sscan,\sat\sleast\sas\slong\sas\sit\sremains\sunix-time)\sand\sthe\sfact\sthat\sit\shas\sbeen\simplemented\squasi\snowhere.\r\n\r\nHowever,\sI\sthink\sI\smanaged\sit\sin-between,\shere\sis\sthe\sbranch\sthat\sshall\ssatisfy\sall\sof\sthem:\s[./vdiff?from=13d4d3d6f26d2ffa&to=bug-f2b5f89c0d-alt-leapsec|bug-f2b5f89c0d-alt-leapsec].\r\n\r\nThe\spros:\r\n\r\n\s\s*\s\sleap\ssecond\sdetected\smore\sprecise,\sbecause\sestimated\sfrom\sUTC\stokens\sor/and\scomplying\sreal\sleap-second\stable\sof\siana;\r\n\s\s*\s\sleap\ssecond\sremains\sin\sthe\ssame\scalendar\sday\sas\sprevious\ssecond;\r\n\s\s*\s\salmost\sno\sperformance\sloss\s(excepting\sthe\ssingle\sload\sof\sleap-sec\stable\sonce\sper\sprocess);\snot\saffected\sat\sall\sfor\sall\stimes\sexcepting\sThh:mm:60;\sand\sit\suses\svery\soptimal\salgorithm\s(interpolation\sbinary\ssearch,\sIBS),\swhich\schecks\swhether\sthe\ssecond\sis\sleap\sor\snot,\sin\soptimal\scase\swith\ssingle,\smostly\swith\s2,\smaximally\swith\s3\siterations\sin\sthe\stable,\sso\sit\sis\salmost\sto\sneglect;\r\n\s\s*\s\sbesides\sthe\sscan\sresult\sof\sleap\ssecond\scovers\sISO\s8601\sstandard\smore\ssane\sand\sit\sis\salso\smore\ssimilar\sto\sOS\sbehaviour\s(long,\sfrozen\ssecond\sThh:mm:59),\sit\salso\smatches\sbetter\sto\sthe\sinput\sstring\s(e.\sg.\sall\stokens\sexcepting\sthe\ssecond\sremain\sthe\ssame\s-\scalendar\syear,\smonth,\sweek\sof\syear,\sday,\sweekday,\shour\sand\sminute\sare\sthe\ssame\sas\sspecified\sin\sinput\sor\sare\sin\saccordance\swith\sthe\stimestamp\sof\sleap\ssecond);\r\n\s\s*\s\swith\sthe\stable\sit'd\sbe\sable\sto\scapture\severy\sleap\ssecond\s(after\supdate\swith\stclZIC\sfrom\siana\sdatabase),\seven\sif\sit\swill\snot\sfollow\sthe\scurrent\srules,\se.\sg.\sbelong\sto\sdifferent\sdates\sthan\s"31\sDec"\sor\s"30\sJun";\r\n\s\s*\s\sapart\sfrom\sthe\stable,\sit\scan\salso\sestimate\sthe\sleap\ssecond\s("31\sDec"\sor\s"30\sJun",\s"T23:59:60\sUTC"),\swhat\swill\sdetect\spossible\sfuture\sleap\ssecond\swithout\san\supdate\s(of\s"tzdata/.leapsec");\r\n\s\s*\s\son\sdemand,\sit\sis\spossible\sto\sdisable\sestimation\sof\sleap\ssecond,\sso\sit'd\sonly\sinspect\sthe\sleap\stable.\r\n\r\nThe\scons:\r\n\r\n\s\s*\s\sunknown,\sexcepting\sthe\sdeviation\sto\s8.6\s(but\sbefore\sthe\sfix\s[595fad24d70e1693]\sit\snever\sworked\sproperly,\sso\sit\sdoes\sno\smatter,\sin\smy\sopinion);\r\n\s\s*\s\sa\sbit\sgrown\scode\sbase.
J login sebres
J mimetype text/x-fossil-wiki
K f2b5f89c0d8520ea86b929daa19ec13fc3a24d2d
U sebres
Z d7687b68e24e1bafa3dc1e46abd097e1