+++ to secure your transactions use the Bitcoin Mixer Service +++

 

|
|
Subscribe / Log in / New account

2038: only 21 years away

Benefits for LWN subscribers

The primary benefit from subscribing to LWN is helping to keep us publishing, but, beyond that, subscribers get immediate access to all site content and access to a number of extra site features. Please sign up today!

By Jonathan Corbet
March 15, 2017
Linaro Connect
Sometimes it seems that things have gone relatively quiet on the year-2038 front. But time keeps moving forward, and the point in early 2038 when 32-bit time_t values can no longer represent times correctly is now less than 21 years away. That may seem like a long time, but the relatively long life cycle of many embedded systems means that some systems deployed today will still be in service when that deadline hits. One of the developers leading the effort to address this problem is Arnd Bergmann; at Linaro Connect 2017 he gave an update on where that work stands.

That work, he said, is proceeding on three separate fronts, the first of which is the kernel itself. He has been working for the last five years to try to prepare the kernel for 2038. Much of that work involves converting 32-bit timestamps to 64-bit values, even on 32-bit systems. Some 32-bit timestamps also show up in the user-space API, which complicates the issue considerably. There is a plan for the enhancement of the user-space API with 2038-clean versions of the problematic system calls, but it has not yet gotten upstream. One recent exception is the statx() system call, which was merged for 4.11; statx() will serve as the year-2038-capable version of the stat() family of calls. There are quite a few other system calls still needing 2038-clean replacements, though.

There is one other person, Deepa Dinamani, working on the kernel side of things; she started as an Outreachy intern and has continued to work on the problem after the internship ended. Dinamani has a set of virtual filesystem layer patches in hand, which address one of the hardest [Arnd Bergmann] problems, and she has plans for some other system calls as well. One of the trickier ones might be setsockopt(), which isn't easily fixed or emulated at the glibc level. There are device-mapper and input subsystem patches in an advanced state. Bergmann had a patch for the video4linux subsystem, but that was rejected and needs a new approach; a similar situation exists for the audio subsystem. Other areas needing work in the kernel are key management and realtime clocks.

For some system calls, there will be no replacement, since the best approach appears to be emulation in the C libraries — the second focus for the year-2038 effort. There has been a lot of work done in the glibc community in particular, he said; the plan is to be fully backward compatible at that level. That means that it will be possible to build a program with either 32-bit or 64-bit timestamps, and to use the larger timestamps even on older kernels. In other words, the glibc developers are trying to make things work everywhere, with a minimum of disruption. (See this draft design document for lots of details on the glibc plan.)

The third focus is on distribution builds, which can only really proceed once the first two pieces are in place. Most distributors, Bergmann said, are unlikely to even bother with 32-bit systems in 2038, so they won't have much to worry about. One big exception may be Debian, which seems interested in maintaining support, even though it looks like it will be a painful task. It may require a full rebuild at some point, which isn't much fun for anybody involved, but it is at least a process that is known to work. Compatibility is key in such a system; there is code being deployed now that may not be 2038-clean, but people want it to keep working if at all possible.

One big area of concern is automobiles. A lot of devices, such as handsets, will have long since failed for any of a number of other reasons by then, so there is little point in ensuring that they can survive 2038. But people keep cars going for a long time. There may still be cameras in use by then, and there is highly likely to be a lot of deeply embedded systems such as building infrastructure. Some of these systems are going to fail in 2038. That is why it is important to get the problem fixed as soon as possible.

There are some things that are going to be difficult to fix, though, even when the kernel, C libraries, and distributions are mostly taken care of; many of these are the result of the use of 32-bit time_t values in file formats. Thus, for example, cpio will fail, which is problematic because it is used by the RPM package format. The NFSv3, ext3, and XFS filesystems all have problems resulting from their use of 32-bit timestamps. The first two are likely to have gone out of use long before the problem hits, and plans for the repair of XFS are in the works. Then, of course, there is a whole list of applications that nobody has yet noticed are broken, and lots of in-house applications that cannot be fixed by the community.

When asked which tools he is using for this work, Bergmann replied that his core technique involves building kernels with the 32-bit time types removed completely. That will quickly point out the places that still need to be fixed. Beyond that, he said, it's mostly a manual process. It was suggested that sparse or GCC plugins could maybe help with this task.

As things wound down, John Stultz asked how much the work in the BSD camp, which has (in some variants) already solved its year-2038 problems, might help with Linux. The answer would appear to be "not much". BSD-based distributions have the advantage of being able to rebuild everything from scratch, so they do not need to maintain user-space ABI compatibility in the same way. There is some value in in the work that has been done to fix applications with year-2038 problems, but it's not clear how much that will help the Linux community.

[Thanks to Linaro and the Linux Foundation for funding your editor's travel to Connect.]

Index entries for this article
KernelYear 2038 problem
ConferenceLinaro Connect/2017


(Log in to post comments)

2038: only 21 years away

Posted Mar 15, 2017 18:14 UTC (Wed) by amacater (subscriber, #790) [Link]

cpio - will break .deb as well :(

Is there a scope for making a cpio64 or similar, declaring a flag day and switching to it five years from now?

2038: only 21 years away

Posted Mar 15, 2017 18:20 UTC (Wed) by andrewsh (subscriber, #71043) [Link]

deb format doesn’t use cpio.

2038: only 21 years away

Posted Mar 15, 2017 19:34 UTC (Wed) by dmoulding (subscriber, #95171) [Link]

And what about initramfs? It's a cpio archive, as well.

2038: only 21 years away

Posted Mar 15, 2017 19:50 UTC (Wed) by arnd (subscriber, #8866) [Link]

It's relatively easy in the kernel as we control the unpacking code.

We can either change the kernel to completely ignore the times in initramfs and pretend every file has the same timestamp, to ensure that nothing breaks in 2038 that isn't already broken, or we can apply some windowing and interpret negative timestamps as post-2038 times.

2038: only 21 years away

Posted Mar 15, 2017 22:23 UTC (Wed) by SEJeff (guest, #51588) [Link]

But what is the correct thing for the kernel to do? That is the fun question worth asking today.

2038: only 21 years away

Posted Mar 17, 2017 4:26 UTC (Fri) by jwarnica (subscriber, #27492) [Link]

Assume any timestamp before, say, 1995 is after (1995-1970)+(2032).

This will work for most of reality.

2038: only 21 years away

Posted Mar 23, 2017 15:03 UTC (Thu) by Wol (subscriber, #4433) [Link]

Until you find a photographer has scanned his negative archive and corrected the exif data ... :-)

I think that's a very dangerous assumption, though not likely to be a problem for the OS. It'll break user-space badly, though.

Cheers,
Wol

2038: only 21 years away

Posted Mar 16, 2017 0:07 UTC (Thu) by walters (subscriber, #7396) [Link]

Note for OSTree, we intentionally omitted timestamps entirely from per-file metadata: https://mail.gnome.org/archives/ostree-list/2013-December...

And for rpm-ostree, we do obviously import RPMs - but since we're committing them into an OSTree repo, the timestamp data is hence discarded. This currently matters the most in the package layering case - we today rerun all triggers/posts on upgrade to avoid hysterisis, but it also helps avoids depending on timestamps for %post scripts. The cost is pretty low.

Basically, I think no one should really care when the individual files in a package were built. OSTree *does* have a per-commit timestamp to help prevent accidental or MITM-induced downgrades, but that's 64 bit.

Hmm, I just noticed git's commit objects actually use ASCII seconds-since-epoch; in the git source as of `v2.12.0-306-g4a9b9b32d47212e4ea43cd1fa3c11afef6d4c491`:

```
struct commit {
...
unsigned long date;
};
```

A little surprising this isn't already a uint64_t. But at least the ASCII encoding means it's fixable. Ah, and in libgit2 it's already `typedef __time64_t git_time_t;`.

2038: only 21 years away

Posted Mar 17, 2017 16:14 UTC (Fri) by fw (subscriber, #26023) [Link]

cpio uses a 33-bit field (11 octal digits) for the mtime, so it's not going to break soon. (The overflow into the 11th digit already required some fixes.)

2038: only 21 years away

Posted Mar 16, 2017 4:22 UTC (Thu) by lyallp (guest, #74741) [Link]

Good thing I use Gentoo.

Everything is built from source with the exception of proprietary software.

Ok, my XFS filesystems in their current form will fail but since I do daily updates, sometime in the next 21 years I would expect a migration to occur, similar to IOS 10.3 changing from HPFS+ to APFS.

2038: only 21 years away

Posted Mar 16, 2017 7:25 UTC (Thu) by eru (subscriber, #2753) [Link]

The NFSv3, ext3, and XFS filesystems all have problems resulting from their use of 32-bit timestamps. The first two are likely to have gone out of use long before the problem hits,

I suspect NFSv3 will still be around. The problem is NFSv4 is so different it is hard to migrate to smoothly.

2038: only 21 years away

Posted Mar 16, 2017 8:29 UTC (Thu) by dd9jn (✭ supporter ✭, #4459) [Link]

32 bit timestamps are not a problem of the protocol but of applications which falsely assume that time_t is signed. Testing for an error should be done by comparing to (time_t)(-1) and not by checking for a negative result.

OpenPGP also uses 32 bit timestamps and we won't change that any time soon. There is plenty of time to change the Epoch before 2106 sets and end to the current Epoch.

2038: only 21 years away

Posted Mar 16, 2017 13:38 UTC (Thu) by smcv (subscriber, #53363) [Link]

> Testing for an error should be done by comparing to (time_t)(-1) and not by checking for a negative result.

So there is one second during 2038 that some APIs cannot represent, but the second before it and the second after it are fine? That seems an odd design...

2038: only 21 years away

Posted Mar 16, 2017 13:41 UTC (Thu) by smcv (subscriber, #53363) [Link]

No, my mistake, ((signed whatever) -1) is just before the wrap-around to 0, so the range of valid values is indeed contiguous.

2038: only 21 years away

Posted Mar 17, 2017 0:16 UTC (Fri) by flussence (subscriber, #85566) [Link]

It took me several months, on and off, to finally get NFSv4 working. Almost all resources I found out there are written for v3, and many are written as if that were bleeding edge and v2 was the current version.

It won't surprise me if there's a separate NFSv4 flag day between 2038 and now... I wonder how many NASes are being sold with only v3 support today?

2038: only 21 years away

Posted Mar 23, 2017 16:25 UTC (Thu) by arnd (subscriber, #8866) [Link]

I checked the nfsv3 code again and had indeed misremembered what Linux does: the timestamp is interpreted as unsigned on 64-bit machines today, so we are good until 2106 in theory.

The problem is nfsv3 implementations that treat the timestamp as signed, and that includes today's 32-bit linux kernels, and probably half of the other implementations (file system implementors elsewhere have been relatively random in their interpretation of time stamps being either signed or unsigned).

2038: only 21 years away

Posted Mar 16, 2017 8:23 UTC (Thu) by mjthayer (guest, #39183) [Link]

Would it make any sense, for the places where 32-bit time stamps can not be fixed, to slide the time window they represent? I am sure that by 2038 there will not be that many cpio archives from 1970 in common use, and perhaps people can just live with the fact that the few that are will have wrong timestamps?

2038: only 21 years away

Posted Mar 16, 2017 12:07 UTC (Thu) by epa (subscriber, #39769) [Link]

The new Epoch could be 2011-10-12?

2038: only 21 years away

Posted Mar 16, 2017 13:11 UTC (Thu) by lkundrak (subscriber, #43452) [Link]

Why that particular date?

2038: only 21 years away

Posted Mar 18, 2017 2:32 UTC (Sat) by CChittleborough (subscriber, #60775) [Link]

I guess it's because that's the date of Dennis Ritchie death.

2038: only 21 years away

Posted Mar 16, 2017 12:43 UTC (Thu) by sorokin (guest, #88478) [Link]

The problem I see is that time stamps are not only printed, but also compared. And usually they are compared using built-in comparison operators of C.

If they were opaque structs with overloaded C++ operators <, >, = that would be more feasible. But if they were opaque structs we would have no problem in the first place.

2038: only 21 years away

Posted Mar 16, 2017 13:46 UTC (Thu) by mjthayer (guest, #39183) [Link]

> The problem I see is that time stamps are not only printed, but also compared.

Ahem, yes. And time_t is signed, which means that it cannot just be let to overflow and continue, which was what I had in mind.

2038: only 21 years away

Posted Mar 16, 2017 15:00 UTC (Thu) by dd9jn (✭ supporter ✭, #4459) [Link]

time_t is not signed. C99 merely says:

clock_t and time_t
which are arithmetic types capable of representing times;

thus it is undefined whether it is signed or unsigned. Traditionally the return value of time() was a long and thus many implementations used to typedef time_t as long. But there is no need for this and it would work just fine with an unsigned integer, if there would not be code which uses

if (time(NULL) < 0) oops();

or uses (before - after) terms. Portable programs won't have a problem with an unsigned time_t. But nevertheless making time_t unsigned is an ABI change and thus it is easier to do it like BSD and directly switch to a 64 bit type.

FWIW, around 2003 I met with the glibc maintainer to ask him to start migration to a 64 bit time_t. Back then I was in a need for post 2038 timestamps due to some root certificates having an insane long term. Uli rejected that with the claim that time_t was never intended to represent arbitrary times (i.e. future timestamps) :-(

2038: only 21 years away

Posted Mar 16, 2017 15:06 UTC (Thu) by ianmcc (subscriber, #88379) [Link]

*bangs head against wall*

2038: only 21 years away

Posted Mar 17, 2017 1:35 UTC (Fri) by gdt (subscriber, #6284) [Link]

undefined whether it is signed or unsigned

C is even more undefined than you suggest. An implementation must use an "arithmetic type", but need not supply an arithmetic value within that type. The ANSI C Rationale says

No arithmetic properties of these types are defined by the Standard … The representation need not be a count of some basic unit; an implementation might conceivably represent different components of a temporal value as subfields of an integer type.

So you can see that ANSI C gives a programmer wanting to write portable time_t handling code very little. Only the ability to compare a time against (time_t)(-1) to check for errors. You could argue that ANSI C allows a time_t to be compared for equality, but you friend could counter-argue that the Standard doesn't forbid multiple representations for the same time in a time_t. ANSI C does require that a time in a struct tm returned by a library has only one representation. The ANSI C committee created difftime() to give the language more time_t handling ability; however that returns a double, which is problematic for some programming tasks.

Thankfully POSIX/SUS applies additional requirements for time_t on UNIX-like systems. "The time() function shall return the value of time in seconds since the Epoch".

As far as I can tell, POSIX/SUS makes no statement on the signedness or unsignedness of time_t, thus neither can be relied upon by a programmer.

Implementation practice in AT&T and BSD UNIXen prior to POSIX was that time() was signed. Of course, such practice shouldn't be relied upon by a programmer.

2038: only 21 years away

Posted Mar 23, 2017 15:09 UTC (Thu) by Wol (subscriber, #4433) [Link]

So if a user space programmer wants to use time_t to represent dates at the start of last century ... ?

Okay, I'm used to a database that represents dates as "days since epoch" (1 Jan 1967 iirc), but negative dates are a matter of course ... :-)

Cheers,
Wol

2038: only 21 years away

Posted Mar 16, 2017 9:13 UTC (Thu) by marcH (subscriber, #57642) [Link]

> Some of these systems are going to fail in 2038.

Interestingly enough timestamps are used not just for past and present but for *future* dates as well; for some unknown reason this aspect seems consistently dropped from discussions. Scheduling, planning, projecting, predicting, etc. For instance a mortgage plan can run past 2038 already *today*. Granted a kernel probably never looks that far ahead (doesn't it?) and no one sets alarms that many years in advance. However good to keep in mind that the concept of a future timestamp is very real otherwise/elsewhere.

2038: only 21 years away

Posted Mar 16, 2017 13:24 UTC (Thu) by bandrami (guest, #94229) [Link]

Google Calendar, oddly enough, lets you schedule up through 2039 (but no later). I assume that's just to prove they can?

2038: only 21 years away

Posted Mar 16, 2017 14:41 UTC (Thu) by gdt (subscriber, #6284) [Link]

Has a calendar, scheduling or similar application ever been able to use the system time_t type as its representation for dates? Just as there is a 2038 problem I expect there might also be a 1910 problem. Even at the start of the UNIX epoch in 1970 there would have been birthdates outside the 1910-2038 range. Given that, I suspect that the UNIX system designers had not intended for the system time representation to be suitable for calendaring, scheduling, etc.

2038: only 21 years away

Posted Mar 16, 2017 18:45 UTC (Thu) by rgmoore (✭ supporter ✭, #75) [Link]

Given that, I suspect that the UNIX system designers had not intended for the system time representation to be suitable for calendaring, scheduling, etc.

That intent doesn't matter. What matters is how the real-world programs people depend on deal with time, and plenty of them have gone ahead and used UNIX system time representation for all kinds of stuff. It's too late to berate programmers for using UNIX system time in domains it wasn't intended for; now we have to deal with the problems doing so has created.

2038: only 21 years away

Posted Mar 17, 2017 23:18 UTC (Fri) by plugwash (subscriber, #29694) [Link]

The minimum date representable by a 32-bit signed time_t is "Fri, 13 Dec 1901 20:45:52".

Most dates people use in everyday life are relatively close to the present day. Few things are scheduled more than a few years in advance.

Birthdates could be a potential issue but even in 1970 most people born in 1901 or earlier would have been retired.

2038: only 21 years away

Posted Mar 17, 2017 23:27 UTC (Fri) by marcH (subscriber, #57642) [Link]

> Most dates people use in everyday life are relatively close to the present day. Few things are scheduled more than a few years in advance.

Software that "mostly works" is indeed plenty good enough to sell and make money. So why would anyone go the extra mile? Any customer who can't tolerate infrequent crashes, security breaches and unsupported corner cases will either need to spend a lot more money or be left high and dry. Sometimes both.

2038: only 21 years away

Posted Mar 18, 2017 13:15 UTC (Sat) by roblucid (guest, #48964) [Link]

The problem is that software that does the right thing, isn't available as soon, costs much more and then has no user base, when compared to software developed with compromises which ships sooner. Release early and often, is similarly a better survival characteristic than over-engineering for the very long term.

2038: only 21 years away

Posted Mar 17, 2017 9:14 UTC (Fri) by pr1268 (subscriber, #24648) [Link]

I suspect that most banks / mortgage lenders have already accommodated the Y2038 problem in their software with e.g. custom data structures for dates and times.

I base my claim on remembering in the news from around 1998 or so that mentioned banks were already Y2K compliant because they anticipated that change as early as 1975 or so (25 year mortgages...). The U.S. Social Security Administration also received a grade of "A" for its preparedness (the only federal organization to receive such a grade).

I also suspect (hope?) that most prepared organizations have written their own software to completely abandon all dependency on the kernel's (and C library's) representation of "epoch" seconds, irrespective of 32-bit or 64-bit, to ensure nothing breaks.

2038: only 21 years away

Posted Mar 17, 2017 11:24 UTC (Fri) by NAR (subscriber, #1313) [Link]

Besides, time_t is completely useless for banks/mortgage lenders in itself, because they have to use (variable) length months to calculate interest, different day count conventions (for some purposes a year consists of 360 days), so they have to use something more clever. On the other hand, for these purposes they are not really interested in sub-day time precision.

xfs?

Posted Mar 16, 2017 12:59 UTC (Thu) by giggls (subscriber, #48434) [Link]

Reading about xfs I was wondering if this is a problem of the XFS on-disk format or kernel API because in the former case 64 bit systems would be affected as well.

As I was able to set file dates to way beyond 2038 on my 64 Bit Linux system I would assume the latter, right?

Sven

2038: only 21 years away

Posted Mar 16, 2017 21:41 UTC (Thu) by petkan (subscriber, #54713) [Link]

Given how cars are being manufactured today I doubt any of them will survive to 2038. In this regard they are very much like your regular smartphone.

2038: only 21 years away

Posted Mar 17, 2017 0:30 UTC (Fri) by gdt (subscriber, #6284) [Link]

The ABS' Motor Vehicle Census 2016 data cube Table 9 has 20% of all vehicles in Australia with a manufacturing date prior to 2000. That rises to 38% for non-passenger, non-freight vehicles (ie: real-life "Tonka" plant lasts as long as the toy). I glanced at two previous MVCs to check that the proportions were not radically different across the past decade.

If many vehicles manufactured now do have a Y2038 issue then those statistics suggest that the effect in 2038 would be too substantial to be handwaved away.

That in turn means there are national policy implications. Motor vehicles are many people's largest or second-largest asset. Alternatively, if vehicles are disposable, then having ~20% of the all vehicles retired immediately prior to 2038 has implications for disposal arrangements.

2038: only 21 years away

Posted Mar 21, 2017 5:13 UTC (Tue) by louie (guest, #3285) [Link]

Cars today last longer than they ever have. In the US, the average age of a car on the road last year was 11.6 years, two full years longer than in 2002 (first year Institute for Highway Safety tracked the number). (cite) The US DOT's data is similar; 11.4 years in 2014, 9.8 years in 2002, and 5.1 years in 1969. (cite)

It is entirely possible that software changes that curve, of course. But if that trend continues, the average car in 2038 will have been built in 2024 or thereabouts. So no, not much time.

2038: only 21 years away

Posted Mar 21, 2017 16:07 UTC (Tue) by Jonno (subscriber, #49613) [Link]

> In the US, the average age of a car on the road last year was 11.6 years, two full years longer than in 2002 (first year Institute for Highway Safety tracked the number). The US DOT's data is similar; 11.4 years in 2014, 9.8 years in 2002, and 5.1 years in 1969.

Honestly, the average age is a pretty meaningless statistic, because a small number of really old collector's cars can bring the number up significantly. Much more relevant for this discussion is _median_ (50-percentile) age and the 90-precentile age. I haven't been able to find those figures for the US, but for Sweden, they are 10 years and 19 years, the same at both the end of 2016 and the end of 2002 (oldest data available online [1]).

So if we want to instantly replace less than 10% of all cars in 2038, we need to fix this in time for auto-makers to include the fix in the 2019 model year cars, which means it has to be in the *next* longterm kernel release (circa 4.14) and second next glibc version (2.27). To get that done, we need to write, test, review and merge all relevant code *this year*!

[1]: http://www.scb.se/hitta-statistik/statistik-efter-amne/tr... (in Swedish).

2038: only 21 years away

Posted Mar 23, 2017 16:28 UTC (Thu) by arnd (subscriber, #8866) [Link]

Note that kernels are typically several years old by the time they get deployed in automotive, and the OS will then be shipped basically unmodified for another five to ten years before it gets replaced.

2038: only 21 years away

Posted Mar 21, 2017 22:16 UTC (Tue) by flussence (subscriber, #85566) [Link]

It may be that the cars would have lasted just as long if maintained properly, but people in the US could afford to buy new ones more often in the past.

(I imagine equivalent numbers for phone ownership would show the opposite trend...)

2038: only 21 years away

Posted Mar 23, 2017 12:10 UTC (Thu) by temun (guest, #114741) [Link]

But which part of a car is likely to use time_t?

The only part of my car which has any reason to care about standardised time is the radio, which sets its time from RDS. The RDS time (https://en.wikipedia.org/wiki/Radio_Data_System#Group_Typ...) uses a 17-bit field for the "Modified Julian Day Code" so it presumably stops working in Sep 2217, though I suppose there's a risk that it will fail in Apr 2038 if someone accidentally treated it as 16-bit and forgot to test. So my car may have a Y2038 problem, but it's a different one from the subject of this article. There are at least two dangerous dates in 2038: one in Jan (signed 32-bit seconds from 1970) and one in Apr (unsigned 16-bit days from 17 Nov 1858).

2038: only 21 years away

Posted Mar 23, 2017 22:48 UTC (Thu) by bronson (subscriber, #4806) [Link]

1858? If there's a car running VMS, I need to know so I can buy it! Or avoid it... I'm conflicted.

2038: only 21 years away

Posted Mar 23, 2017 22:59 UTC (Thu) by bronson (subscriber, #4806) [Link]

Interesting, DVB-SI (streaming video over satellites) also has an April 2038 problem. Any others? I'm disappointed this drain brammage escaped the confines of OpenVMS.

Not sure either of these will still be broadcast in 2038... we'll see.

2038: only 21 years away

Posted Mar 17, 2017 19:09 UTC (Fri) by dpreed (subscriber, #21184) [Link]

I wonder if anyone has considered an alternative approach. That would be to use a different Epoch date, as many in the "time standard" world are doing. Instead of a time near the beginning of (but not precisely because of historical quirks and leap seconds) 1970, why not use the J2000 epoch for devices built after Y2K? You can look that up on Wikipedia, etc.

That seems like it would make file system internal storage, etc. not have the risk of changing alignment, etc.

Associated with a particular file system or ABI or locale, you could have a 64-bit offset that gets added to the 32-bit internal representation, and add that offset to present the full 64-bit number in a clean way.

2038: only 21 years away

Posted Mar 21, 2017 22:57 UTC (Tue) by dvdeug (subscriber, #10998) [Link]

Yes, it's been considered, and it's certainly one of the solutions that will be implemented in certain systems. But the Epoch start is part of many standards, so changing it involves an incompatible change, often creating multiple versions of the same standard that aren't distinguishable. It also means that the new systems can't handle data from the older systems; NFS3 should be able to handle the complete range of timestamps on files on the system, whether they be created today or extracted from an archive of Sixth Edition Unix.

2038: only 21 years away

Posted Mar 27, 2017 8:46 UTC (Mon) by temun (guest, #114741) [Link]

There are standard time representations that are cyclic by design, which is equivalent to having a changing epoch. For example, GPS counts the weeks with a 10-bit number, so every twenty years, roughly, it repeats. Systems are supposed to be able to cope with this. If they want to convert to a non-cyclic representation then they must find out roughly what year it is from some other source.

Some of the stand-alone GPS devices for use in cars must be getting on for 20 years old now. Do any of them have problems with the date? As far as I can recall, the elderly device which I occasionally use displays the time, but not the date, so perhaps it could continue working, in theory, for many centuries. The underlying OS is Linux, presumably 32-bit, but there's no compelling reason for the time displayed by the application software to be naively synchronised with the system time. The kernel might think it's 1 Jan 1970 every time it's rebooted. Does anyone know about this? Has anyone here ever broken into one of these Gamin/TomTom/... devices?

2038: only 21 years away

Posted Mar 27, 2017 15:55 UTC (Mon) by mathstuf (subscriber, #69389) [Link]

I had an Android phone (I think it was my Galaxy Nexus which was having other issues, so I don't know if there's any correlation there) that if you rebooted it in Airplane Mode, it would reset back to January 1 1999 (or some other epoch date) and not update until you enabled the cellular connection. I suppose I could try turning it on in two years to see if it can't figure out that it's actually 2019 if I turn on just the GPS.

2038: only 21 years away

Posted Mar 22, 2017 22:57 UTC (Wed) by PaulWay (guest, #45600) [Link]

When I read about this kind of proactive work to try to minimise or eliminate a problem that will manifest more than twenty years away, it gives me great confidence in the open source community. If only other things - politics, for example - were so forward looking!

Have fun,

Paul

2038: only 21 years away

Posted Mar 23, 2017 19:14 UTC (Thu) by ahinds (guest, #114751) [Link]

We don't have to worry about the problem. By the year we now call 2038, we'll just be in the 21st year of what will be called the First Trump Dynasty, with Ivanka taking over from her deceased father as Ruler of the World (or will he be on a permanent golfing vacation?)

2038: only 21 years away

Posted Mar 26, 2017 19:03 UTC (Sun) by fest3er (guest, #60379) [Link]

I think time should be represented as a signed 128-bit value in picoseconds that uses the time of the beginning of the multiverse as estimated as of 1/1/2000 as the epoch. That should allow a computer to store any time from the beginning of the universe to almost any conceivable date in the future (5 exayears is almost inconceivable). Being signed, it would allow the time of the beginning of the universe to be moved backward almost as far as is needed.

2038: only 21 years away

Posted Mar 26, 2017 19:42 UTC (Sun) by liw (subscriber, #6379) [Link]

Can we stop treating time in a simplistic linear fashion, please? Given the general relativity theory, time should be expressed as a (potentially infinitely long) vector of "stretch" factors for different points in the timeline, and a hashmap of such vectors, to allow different points of view, as well as a scrambling function to represent the route of a Tardis as a complicated directed, cyclical graph of points of view of stretching vectors, combined with a seed value for scrambling to represent the Doctor who was using the Tardis at any given, if you pardon the expression, time.

And this is still a simplistic model, since it doesn't take into account retconning for narrative purposes at all. But adding the retcon compressor is left as an exercise for the reader.

After that, we can finally have some peace of mind as far as time representation goes, and tackle the three fundamnetal unsolved problems in computer science, namely cache validation, naming of things, and counting beyond two.


Copyright © 2017, Eklektix, Inc.
This article may be redistributed under the terms of the Creative Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds