Time

Joe Fahle (jhf@seaspace.com)
Thu, 13 Jan 94 10:07:27 PST

In response to Eric Pepke's mail ...

Here, for better or for worse, we have used the following pair
of units to parameterize time

std_date - days since Jan 1, 1990, inclusive
std_time - seconds of the day (either as a long, float, double)

We are in the satellite business, so we pretty much stick to GMT.

"std_date" and "std_time" are not variable names; they are units.

We use these units to determine print format. We always print
dates as yy/mm/dd and time as hh:mm:ss.sss . If users every want
different print formats, that really is a job for preferences
(e.g., the UNIX environment variable TZ) .

The instant we import data, we try to get any date and time variables
into "std_date" and "std_time" units. Similarly, when we export data
(or print it), we try to put it into a friendlier form.

We have lived (and died) with this decision for about 7-8 years.

We never have regretted keeping dates and times in GMT. We have
had mixed feeling about 'days since Jan 1, 1990'. This idea came
from Informix. Days since Jan 1, 1970 would have been more UNIXy.

What might have been even better would be (fractional) days since
1/1/1970 (or 1/1/1900) as a double precision value.

In any case, we really like the ability to trivially difference
(date,time) pairs, e.g. diff = (date1-date2)*86400 + (time1-time2)
in seconds.

Hope this is useful ...
Joe Fahle