Mtools Year 2000 compatibility

The year 2000 problem is relevant for mtools because of dates on files, both on the Dos side, and on the Unix side. Dates should be interpreted and represented correctly. AFAIK, this is the only relevance. Hence I performed the following simple tests to check out year 2000 readyness. Each test example involves 4 steps:

Click here to skip the lengthy examples

$ touch -t 010100002000 xyz
$ ./mformat e:
$ ./mcopy -m xyz e:
Copying xyz
$ ./mdir e:
 Volume in drive E has no label
 Volume Serial Number is 53E6-4DCD
 Directory for E:/

xyz                  0 01-01-2000   0:00  xyz
        1 file(s)                 0 bytes
                          1 448 448 bytes free

$ ./mcopy -m e:xyz m
File "m" exists, overwrite (y/n) ? y
Copying xyz
$ ls -l m
-rw-r--r--   1 knaff    users           0 Jan 01  2000 m
$ touch -t 011800002038 xyz
$ ./mformat e:
$ ./mcopy -m xyz e:
Copying xyz
$ ./mdir e:
 Volume in drive E has no label
 Volume Serial Number is 0FF2-90FA
 Directory for E:/

xyz                  0 01-18-2038   0:00  xyz
        1 file(s)                 0 bytes
                          1 448 448 bytes free

$ ./mcopy -m e:xyz m
File "m" exists, overwrite (y/n) ? y
Copying xyz
$ ls -l m
-rw-r--r--   1 knaff    users           0 Jan 18  2038 m 
$ touch -t 010100001980 xyz
$ ./mformat e:
$ ./mcopy -m xyz e:
Copying xyz
$ ./mdir e:
 Volume in drive E has no label
 Volume Serial Number is 4590-59C0
 Directory for E:/

xyz                  0 01-01-1980   0:00  xyz
        1 file(s)                 0 bytes
                          1 448 448 bytes free

$ ./mcopy -m e:xyz m
File "m" exists, overwrite (y/n) ? y
Copying xyz
$ ls -l m
-rw-r--r--   1 knaff    users           0 Jan 01  1980 m
These tests above exerce the three functions of mtools which involve dates:

As you can see, mtools handles dates beyond 2000 all right. However, while it is not affected by the year 2000 problems, it is unfortunately affected by the year 2038 problem (Unix dates roll over at the 19 of January 2038). However, as this later problem is tied to the 32 bit storage size of current Unix dates, the problem will likely have disappeared on its own by then.


>  Here is the specific information that I need.
>
>1) 	Version number and/or distribution date of year 2000 ready software

These tests were performed using mtools-3.8, released on August 7th, 1997. All later versions are ok as well. Indeed, none of the recent changes involved this issue.

These tests were performed on Linux-2.1.59, and the version of 'touch' and 'ls' used were: touch (GNU fileutils) 3.15

Earlyer versions of touch may, (or may not) have Y2K problems, which would make testing difficult (although the problem would not be due to mtools).

The C library used was libc.so.5.4.38. This is relevant, as the localtime() function of the libc is used to translate dates from Unix to Dos. Very old libc's could conceivably have problems here. Libc's on Unices other than Linux could have problems too.


>2) 	Source address of year 2000 ready software
Mtools can be obtained from the following adress:

http://mtools.linux.lu/mtools-3.9.3.tar.gz

N.B. When 3.9.4 will come out, 3.9.3 will be removed.


>3) 	Status of software regarding the year 2000 software readiness criteria
As seen above, mtools is ok between 1/1/1980 and 1/18/2038


>4) 	Strategy and /or schedule to reach year 2000 readiness, if not yet 
>completed

Year 2000 readiness is available now. Moreover, as soon as 64 bit dates will be in general use in Linux, year 2038 readiness will be tested and any occuring bugs corrected.


>5) 	Source address and cost (if any) of replacement product or recommended 
>replacement product
No replacement is needed for mtools to address year 2000 compliancy.


>1) 	Unambiguous date and century recognition before, on, and after January 
>1, 2000

Mtools dates are ok between 1/1/1980 and 1/18/2038. Dates before 1/1/1980 do not make sense for mtools, as DOS was not around back then. The 2038 limit will probably go away by itself as soon as 64 bit computers will be mainstream, which will probably happen long before 2038.


>2) 	Calculations to accommodate same century and multi-century formulas and
>date values
Not applicable, as mtools does not calculate any date differences.


>3) 	Date data interface values that reflect the century

During the applicable range of dates (1/1/1980 to 1/18/2038) the century is displayed.


>4) 	Year 2000 must be recognized as a leap year and handled as such in any 
>calculations

Actually, the year 2000 is rather programmer-friendly, as no exception from the usual rule ("all years divisible by 4...") is needed. Interesting problems will happen in 2100 though...


touch -t 022900002000 xyz
$ ./mformat e:
$ ./mcopy -m xyz e:
Copying xyz
$ ./mdir e:
 Volume in drive E has no label
 Volume Serial Number is 103F-82D4
 Directory for E:/

xyz                  0 02-29-2000   0:00  xyz
        1 file(s)                 0 bytes
                          1 448 448 bytes free

$ ./mcopy -m e:xyz m
File "m" exists, overwrite (y/n) ? y
Copying xyz
$ ls -l m
-rw-r--r--   1 knaff    users           0 Feb 29  2000 m

>5) 	Date related calculations must not result in system failures
None of the dates that I tried crashed mtools, nor the OS.

If you need any additional tests that are not covered in this file, or if you think that any of the points I marked "non applicable" are relevant anyways, don't hesitate to contact me.

Legal Disclaimer:
The above text should be used for informational purposes only. It does not imply any warranty of any kind. Future versions of mtools may or may have the same behavior. Behavior in different environments may vary. If you need a strong legal commitment, please make an arrangement with one of the many professional Linux distributors, such as Red Hat, Suse, Caldera, etc.


Alain Knaff
Last modified: Fri Oct 8 07:15:50 MEST 1999