DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2013-01-17 07:06:19

ottsm
Member
Registered: 2010-12-23
Posts: 44

Year 2038 bug?

I have funplug 0.7 installed.  Noticed when using the date command that it can't handle dates > 2038-01-18 12:14:07.  The 2038 bug is a known issue for quit some time.  Of course my DNS probably won't last that long.  Still kind of makes you think.

Try typing the following;

date +"$s" -d "2038-01-18 12:14:07"
output will be
2147483647

date +"$s" -d "2038-01-18 12:14:08"
output will be
?

date +"$s" -d "2040-01-18 00:00:00"
output will be
date: invalid date '2040-01-18 00:00:00'

wonder what is going to happen to my stored data past this date?  Or is it just funplug that is effected and not the DNS and it's file structure?  Anyone in a position to set the built in clock past 2038 and not hurt anything?

Offline

 

#2 2013-01-17 13:32:30

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 709

Re: Year 2038 bug?

ext2/3 uses a 32 bit timestamp. AFAIK it's up to the userland (libc and friends) to interpret these. There are two implementations, treating it as a signed or as an unsigned stamp. In the first case the scope is from 1902 to 2038, in the second case from 1970 to 2106.
*If* ext2/3 is still around in 2038, I suppose the userland will treat is as unsigned.
Though I have no real knowledge about other, more modern filesystems, I suppose they use a 64 bit timestamp. But ext4 could be an exception. As it's downcompatible to ext2 (you can still force mount an ext4 partition ext2, if you like), so at least it has 32 bit timestamps, but maybe it has also 64 bits timestamps in an extended structure.

Anyway, you don't need to worry about your data for this reason. As long as the filesystem can be read, the data is available. Maybe you'll have a problem in 2200, to decide if some file is dated 2013 or 2149.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB