Skip to content
Tcl Source Code Artifact [e16b55ce42]
Login

Artifact [e16b55ce42]

Artifact e16b55ce422ac0026aca19b77c6942bc70ad21ebee47c4c1b68de4dbfba83fd3:

Ticket change [e16b55ce42] - 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-22 15:18:44.
D 2024-11-22T15:18:44.958
J icomment >\sThere\sis\sno\s'right'\sanswer\shere.<br/>\r\n>\sSo\swe\shave\sto\sround\sdown\s(your\spropsal)\sor\sup\s(my\sproposal,\sand\scurrent\sTcl\s8.x\sbehavior)...\r\n\r\nAnd\swhat\sis\sabout:\r\n\r\n-\sall\scurrent\sOS\sround\sit\sdown\s(freezes\sthe\ssecond);\r\n-\sthe\sISO\sstandard\sdefinitely\ssays\sabout\sthe\ssame\scalendar\sday;\r\n-\sit\sis\smore\slogical\sand\sconsistent\sto\sbehave\sthe\ssame\syear/month/quarter/week/date/hour/minute,\sbecause\sit\ssimply\scorresponds\sto\sinput\sstring\smore\ssane;\r\n-\sit'd\sbe\smore\sconsistent\sif\ssome\sformatted\stokens\swill\sbe\ssupplied\sto\sother\sprocesses\sor\sfurther\scalculations\s(since\sit\sis\sstill\sthe\ssame\sday\sand\sthe\sOS\ssecond\s"T235960\sUTC"\sis\sequal\s"T235959\sUTC").\r\n-\sTcl\s8.x\sbehavior\sis\snot\seven\sfew\sdays\sold\s(previously\sit\swas\swrong\scompletely,\sat\sleast\sin\sfree-scan\sunless\sI\srepaired\sit);\r\n\r\nTo\sme\sthe\s"right"\sanswer\sis\spretty\sclear\s(or\sthere\sare\sbasically\stwo\sanswers:\sround\sdown\sor\sforbid\sit).\r\n\r\n>\sReturning\sa\sdifferent\stimestamp\sfor\s-valid\s1\sand\s-valid\s0\sis\snot\slogical:\s-valid\sshould\sonly\sinfluence\sthe\svalidation,\snothing\selse.\s\r\n\r\nWho\ssaid\sit\swill?<br/>\r\nMy\sbranch\sdoes\sit\sALWAYS,\sregardless\sthe\s-validate\sparameter...\sCorrect\sleap\ssecond\swill\sbe\sthe\ssame\sas\s"T235959\sUTC",\sin\sany\scase.\sOnly\swrong\sleap\ssecond\smoves\sto\snext\sday\s(with\s-valid\s0)\sas\spreviously:\r\n\r\n```\r\n%\sclock\sscan\s"2012-06-30\s23:59:60\sUTC"\r\n1341100799\r\n%\sclock\sscan\s"2012-06-30\s23:59:60\sUTC"\s-valid\s1\r\n1341100799\r\n\r\n%\sclock\sscan\s"2012-06-29\s23:59:60\sUTC"\r\n1341014400\r\n%\sclock\sscan\s"2012-06-29\s23:59:60\sUTC"\s-valid\s1\r\nunable\sto\sconvert\sinput\sstring:\sinvalid\stime\r\n```\r\n\r\nSee\salso\sthe\snew\stests\sin\sthe\sbranch\sthat\sdoesn't\shave\sconstraints\sto\svalid_off\s(so\sworks\sfor\sboth\sin\sthe\ssame\smanner).\r\n\r\n>\sThe\schallenge\sis\sproviding\sa\sconsistent\sbehavior.\r\n\r\nI\salready\smastered\sthis\schallenge.<br/>\r\nHowever\sI'm\sstill\sunsure\swhether\sthe\sleap\ssecond\sneed\sto\sbe\sconsidered\sas\svalid\s(and\smy\sbranch\sneed\sto\sbe\smerged).\sBut\sI'm\sdefinitely\sagainst\syour\ssolution,\sthat\syou\smerged\sto\s8.7/9.0\sdespite\sall\sobjections\sfrom\smy\sside.\r\n\r\n>\sThis\smakes\s100%\ssense\sto\sme\r\n\r\nIt\sdoes\snot\sat\sall\s(the\sboth\sformer\sare\stoday,\sthe\slatter\sis\stomorrow).<br/>\r\nAnd\sthen\syou\sseemed\snot\sto\sread,\swhat\sI\swrote\sall\sthe\stime\sbefore.\r\n\r\nFor\sexample,\swhat\sdo\syou\sthink\swould\shappen,\sif\ssome\slarge\sbank\stransaction\s(occurred\sexactly\son\sthe\sleap\ssecond)\smoves\sto\sthe\snext\sday\swhich\swould\sbe\sat\sleast\snext\squarter\sor\seven\s1\sJan\sof\snext\syear,\sfor\sinstance?\sRight,\sit\scan\sbe\sbooked\sin\swrong\sweek,\squarter\sor\seven\syear,\swhat\scould\shave\shard\sconsequences\sfor\sthe\scompany\sor\seven\sfor\sthe\sstate,\scause\snew\sdebts\sor\sdecreasing\sthe\srank\sscore.\sLet\salone\severy\sbank\shas\sreporting\sobligations,\sfor\sinstance\sto\sECB,\sand\sECB\salso\shas\ssuch\sreporting\sobligations,\swhich\scan\sbe\swrong.\sTherefore\sI\semphasize\sit\sagain,\sI'll\salways\sprefer\sno\sresult\s(BOOM)\sto\sthe\swrong\sresult.\r\nBut\salso\s"rounding"\sdown\slooks\sto\sme\sfewer\swrong\sthan\s"rounding"\sup\s(jump\sto\snext\scalendar\sday),\sat\sleast\sit\sis\smore\sconsistent\sin\sany\sdirections\s(see\sbegin\sof\smy\scomment).
J login sebres
J mimetype text/x-markdown
K f2b5f89c0d8520ea86b929daa19ec13fc3a24d2d
U sebres
Z d5fa247d920696e5dccdf3f32754b80b