FATの日時形式

DOSの日時形式

[9] DOSの日時形式は、 FATZIPLHA などで用いられています。

[11] DOS は現在となってはほとんど使われていませんが、 小型ストレージファイルシステムとして FAT がまだ生き残っており、 ZIP も広く用いられています。
[12] NTFS では別形式が使われています。

[1] How to recognize different types of timestamps from quite a long way away – The Old New Thing () https://blogs.msdn.microsoft.com/oldnewthing/20030905-02/?p=42653/

[2] exFAT: Time Stamp Format () http://shullich.blogspot.jp/2009/12/time-stamp-format.html

[3] () https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT

The date and time are encoded in standard MS-DOS format.

[10] 電子機器の時刻 () http://www.ffortune.net/calen/calen/etime.htm

MSDOSのファイル管理システムであるFAT、およびその拡張形式であるWindows95/98/MeのVFATは更新日時を 年(7bit)月(4bit)日(5bit)時(5bit)分(6bit)秒(5bit)の合計32bitで持っています。秒が0-59のはずなのに5bitしかないのは実は偶数にまるめて記録しているためです。年は7bitで0-127年が記録できますが、FATの起点は1980年なので127は2107年に相当します。つまりFAT/VFATは2107年の年末まで正常に動作します。

[4] FAT - ForensicsWiki () http://forensicswiki.org/wiki/FAT#FAT_date_and_time_values

[5] Int 1ah clock service - liangweiqiang () https://sites.google.com/site/liangweiqiang/Home/e5006/e5006classnote/jumptiming/int1ahclockservice

[6] Epoch (reference date) - Wikipedia () https://en.wikipedia.org/wiki/Epoch_(reference_date)

January 1, 1980 IBM BIOS INT 1Ah, DOS, OS/2, FAT12, FAT16, FAT32, exFAT filesystems The IBM PC with its BIOS as well as 86-DOS, MS-DOS and PC DOS with their FAT12 file system were developed and introduced between 1980 and 1981

[7] IROIRO 1999a () https://web.archive.org/web/20000418193849/http://www.asahi-net.or.jp:80/~ez3k-msym/iroiro99a.htm

Windows95 で FAT が拡張されたが, 単に長いファイル名が使えるようになっただけでなく, 時刻関連も拡張されている。 古い FAT では最終更新時刻だけを記憶していたが, 新しい FAT ではこれに加えてファイルの作成時刻と最終アクセス時刻も記憶する。 しかし, おかしなことにこの 3つのタイムスタンプはそれぞれ精度が異なる。

種類 精度

作成時刻 10ミリ秒

最終アクセス時刻 1日

最終更新時刻 2秒

このため, Windows95 でファイルの「プロパティ」を見ると, 「作成日時」「更新日時」「アクセス日」と, 最終アクセス時刻だけが「日時」でなく「日」になっている。

また, ときどき「更新日時」より「作成日時」が 1秒だけ大きいファイルがあるが, これは更新日時が奇数秒のタイムスタンプを持つことができないため 切り捨ててしまったのが原因である。

[8] LHAフォーマット ‐ 通信用語の基礎知識 () https://www.wdic.org/w/TECH/LHA%E3%83%95%E3%82%A9%E3%83%BC%E3%83%9E%E3%83%83%E3%83%88

0Fh WORD ファイルの更新時刻 (MS-DOS形式)

11h WORD ファイルの更新日付 (MS-DOS形式)

[238] UNLHA32.DLLのダウンロード (Micco著, ) https://micco.mars.jp/mysoft/unlha32.htm

UNLHA32.DLL が通常作成する書庫では, タイムスタンプは, すべて協定世界時 (UTC) で扱われます。

[13] [tz] Old timestamps on files () https://mm.icann.org/pipermail/tz/2018-December/027348.html

[14] GPS時間SAP S/4HANAの日時が基準となっています。

[15] Time formatting and storage bugs - Wikipedia, , https://en.wikipedia.org/wiki/Time_formatting_and_storage_bugs#Year_2080

Systems storing the year as a two-digit value 00..99 internally only, like many RTCs, may roll over from 31 December 2079, to the IBM PC and DOS epoch of 1980-01-01.

[16] Time formatting and storage bugs - Wikipedia, , https://en.wikipedia.org/wiki/Time_formatting_and_storage_bugs#Year_2108

The date timestamps stored in FAT filesystems, originally introduced with 86-DOS 0.42 in 25 February 1981 and carried over into MS-DOS, PC DOS, DR-DOS etc., will overflow at the end of 31 December 2107. The last modification date stamp (and with DELWATCH 2.0+ also the file deletion date stamp, and since DOS 7.0+ optionally also the last access date stamp and creation date stamp), are stored in the directory entry with the year represented as an unsigned seven bit number (0–127), relative to 1980, and thereby unable to indicate any dates in the year 2108 and beyond. The API functions defined to retrieve these dates officially only support dates up to 31 December 2099.

This will also affect the ZIP archive file format, as it uses FAT file modification timestamps internally.