Survex and dates

Olly Betts olly at survex.com
Wed Jul 28 12:39:38 BST 2010


On Wed, Jul 28, 2010 at 11:57:24AM +0100, Mark Shinwell wrote:
> On Wed, Jul 28, 2010 at 12:36:02PM +0200, Graham Mullan wrote:
> > Is it going to be possible to deal with the Unix date problem and get  
> > Survex to recognise dates earlier than 1970, or are we tied down by the  
> > vagaries of one operating system?
> 
> I'm not sure what you mean by the Unix date problem.  The usual practice is
> for the standard Unix time type (time_t) to be signed, so you can go back
> before the 1970 epoch.  A 32-bit time_t permits dates from 1901..2038 and the
> 64-bit version goes back older than any cave.

Yes, there's no "Unix date problem" here - the only "Unix date problem" I
am aware of is that signed 32-bit time_t wraps in 2038:

http://en.wikipedia.org/wiki/Year_2038_problem

Also, note that Microsoft Windows uses the 1970 epoch too:

http://msdn.microsoft.com/en-us/library/1f4c8f33%28VS.80%29.aspx

Currently the .3d format stores the date as seconds since 1970, and this
is documented as unsigned, though cavern currently rejects any dates
outside 1970-2038.  This is really just because I haven't had much feedback
on what ranges of dates are useful, and what granularity of time stamping
is useful, so it's just in the easiest format to store - that which we
get from the system.

So anyway, why not tell us what dates you actually want to be able to use?

Cheers,
    Olly



More information about the Survex mailing list