comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: Newbie Q: How to program in UTC (time/calendar) ?
Date: Wed, 25 Mar 2009 15:28:08 +0000 (UTC)
Date: 2009-03-25T15:28:08+00:00	[thread overview]
Message-ID: <gqdii8$fnq$1@aioe.org> (raw)
In-Reply-To: a21b8a18-41fc-4156-a236-8c19ee35350e@z1g2000yqn.googlegroups.com

>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 must have missed where you said what you are doing.  If you want to
find the time between two events in the same time zone in the historical
data, just subtract and get a Duration -- Ada.Calendar.Clock is
irrelevant.  If you want something like "the historical data says this
event happened at 8 am, March 25, 2009, how long ago was that?",
and you don't know the UTC time of that recording or the UTC time of
"now", you're just out of luck.  If you do know both of those. good.

>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.
  Ada.Calendar.Clock can only give your program a reading of the
computer's clock.  If you keep changing the computer's clock as you
travel, you will need to inform the data logging program of each change in
UTC offset.  The simpler approach would be to set the computer's clock to
UTC at the beginning of the trip and not change it as you travel.



  reply	other threads:[~2009-03-25 15:28 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-24  8:51 Newbie Q: How to program in UTC (time/calendar) ? reinkor
2009-03-24  9:18 ` Dmitry A. Kazakov
2009-03-24 10:07 ` Martin
2009-03-24 10:55   ` reinkor
2009-03-24 12:49     ` Martin
2009-03-24 18:53       ` Dirk Heinrichs
2009-03-24 23:59         ` Martin
2009-03-25 10:21           ` reinkor
2009-03-25 15:28             ` tmoran [this message]
2009-03-25 21:55               ` sjw
2009-03-26  1:38                 ` tmoran
2009-03-26 20:58                   ` sjw
2009-03-27 12:52                     ` reinkor
2009-03-27 16:58                       ` Jeffrey R. Carter
2009-03-30 11:27                         ` reinkor
2009-03-30 16:47                           ` Jeffrey R. Carter
2009-03-30 12:37                         ` reinkor
2009-03-30 13:45                           ` John B. Matthews
2009-03-30 16:52                           ` Jeffrey R. Carter
2009-03-30 19:34                             ` reinkor
2009-03-30 19:44                             ` reinkor
2009-04-04  2:22                     ` Brian Gaffney
2009-03-24 11:29 ` Jacob Sparre Andersen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox