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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,aa60d56d22a287d1 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!z1g2000yqn.googlegroups.com!not-for-mail From: reinkor Newsgroups: comp.lang.ada Subject: Re: Newbie Q: How to program in UTC (time/calendar) ? Date: Wed, 25 Mar 2009 03:21:45 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <89277c47-788d-441c-95b2-f47e1b70a532@j39g2000yqn.googlegroups.com> <572820e4-9243-42aa-b05f-fc4dd8ac4ade@a12g2000yqm.googlegroups.com> <180637e5-1975-4f03-901d-aff65cdcf54e@c36g2000yqn.googlegroups.com> NNTP-Posting-Host: 193.156.99.217 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1237976505 18001 127.0.0.1 (25 Mar 2009 10:21:45 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 25 Mar 2009 10:21:45 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: z1g2000yqn.googlegroups.com; posting-host=193.156.99.217; posting-account=bPTmZAoAAAC_6HP9XLKB9aAAxBa6BuOR User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.64 (X11; Linux x86_64; U; en) Presto/2.1.1,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:5255 Date: 2009-03-25T03:21:45-07:00 List-Id: On 25 Mar, 00:59, Martin wrote: > On Mar 24, 6:53=A0pm, Dirk Heinrichs wrote: > > > Martin wrote: > > > These sort of things make sensible time computations hard, e.g. what > > > does "1:30am" mean if the clocks have gone back an hour for winter at > > > 2am? Is it the first 1:30am or the second that night? > > > I'd say that depends on the OS you run your program on (and its > > configuration). > > Exactly - and the times in the original question may not even have > come from the computer doing the calculations - they could be a log > from e.g. a Sat Nav - what would it be doing? > > Cheers > -- Martin I did hope I could use the Ada calendar routines to process "historical" data tagged with UTC - independent of where in the world I run the program. I (at least) want my computations to be independent of the local time of the computer. My program should e.g. give the same result when running on a computer in Alaska or Australia. 2 + 2 =3D 4 all over the world ! :-) And I was born 12 March UTC independet of the "local time" of my computer ! Yes, I know that UTC has its weakness that has to be considered in applications. Anyway, when giving an UTC date/time to a computer program, this should not be affected if the computer change time zone when processing? A travelling computer may run a program many days and while it is passing many time zones. Consider, for examlpe, a web camera/sensor related program on a car/truck driving from coast to coast in USA or Canada ! One has frequently to update UTC_Time_Offset in order to handle input data correct if one wants to tagg events with UTC? reinert