In message <[EMAIL PROTECTED]>, "Bill Hawk
ins" writes:

>Garbage is in the eye of the beholder.

Indeed.

That your "I'm gonna show those morons!!!" example contains serious
bugs in the leap second handling makes this one of my most treasured
emails in this entire debate.

Welcome to category 3) Bill, now please don't waste more time.

Poul-Henning


>/* Main Time Routine */
>
>/* User must set a Leap Second switch when notified of same. */
>/* Use a signed number for the switch if you think it will  */
>/* jump ahead one second. */
>
>/* Handle one second interrupt */
>UTC += 1;
>
>/* Handle Local Time from user-entered parameters, just like MS does */
>Local Time = UTC + Local Time Offset;
>
>/* Handle leap second in UTC and local. Clock doesn't do 60 */
>If Leap Second switch is set {
>   If (UTC is 30 Jun 23:59:59 || UTC is 31 Dec 23:59:59) {
>      Subtract leap second from UTC;
>      Subtract Leap second from Local Time;
>      Turn off leap second switch;
>   }
>}
>/* Handle time shifts from user-entered parameters */
>If Local Time matches Spring Ahead {
>   Local Time += Spring Ahead Increment;
>   Add one year to Spring Ahead;
>}
>If Local Time matches Fall Back {
>   Local Time -= Spring Ahead Increment;
>   Add one year to Fall Back;
>   }
>
>/* End main time routine */

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED]         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

_______________________________________________
time-nuts mailing list
time-nuts@febo.com
https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts

Reply via email to