From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f3f07e9e53bcc4f6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-21 10:17:18 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!vixen.cso.uiuc.edu!howland.erols.net!news-out.worldnet.att.net.MISMATCH!wn3feed!wn2feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!rwcrnsc53.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: FILETIME <-> Ada.Real_Time.Time conversions References: <3c22f147.173527453@News.CIS.DFN.DE> X-Newsreader: Tom's custom newsreader Message-ID: NNTP-Posting-Host: 1ZKU7-196261-NM4-3231419@rwcrnsc53 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc53 1008958637 1ZKU7-196261-NM4-3231419@rwcrnsc53 (Fri, 21 Dec 2001 18:17:17 GMT) NNTP-Posting-Date: Fri, 21 Dec 2001 18:17:17 GMT Organization: AT&T Broadband Date: Fri, 21 Dec 2001 18:17:17 GMT Xref: archiver1.google.com comp.lang.ada:18218 Date: 2001-12-21T18:17:17+00:00 List-Id: > It is clear that the time stamps shall be in UTC. Hardly, because > Ada.Calendar.Time is of no use, because it might be a political time. If the distributed machines want to know what their compatriots think the time is, they need to get synchronized (periodically) and then use their change in Ada.Real_Time.Clock to estimate the change in other machines' Ada.Real_Time.Clock UTC time is irrelevant. You and I could both note what our watches say when the ball drops in NY Times Square when they celebrate New Years. We can both agree to do something when our watches say 180 days have passed. Neither of us need worry about what the UTC time is when the ball drops, or what it is 180 days later. >Ada.Real_Time.Time is well correlated with UTC, but there is no way to >convert one to other. Package Ada.Calendar does that all the time. Inside the computer is an electronic counter - an Ada.Real_Time kind of thing. When you set the time on your system, you are telling it that a counter value of nnnn corresponds to a time of MM/DD/YY HH:MM:SS.ddd. Given the difference between that and any other counter value, the frequency of the counter, and some political information about daylight savings time, Ada.Calendar.Split does some divisions and mods by 60, 24, and the number of days in various months in various years, and comes up with the MM/DD/YY HH:MM:SS.DD corresponding to the new counter value.