containerd / continuity

A transport-agnostic, filesystem metadata manifest system
https://containerd.io
Apache License 2.0
141 stars 67 forks source link

proto: support timestamps #88

Closed AkihiroSuda closed 6 years ago

AkihiroSuda commented 7 years ago

Fix #16 #30

Applier is not implemented yet

@stevvooe @dmcgowan @aaronlehmann @tonistiigi

Signed-off-by: Akihiro Suda suda.akihiro@lab.ntt.co.jp

AkihiroSuda commented 6 years ago

I'm not sure whether we should use 0001-epoch timestamp. i.e. time.Time{} rather than time.Unix(0, 0)

According to Wikipedia, most filesystems except FAT support Unix(1970)-epoch zero but not 0001-epoch zero:

Filesystem From To
Ext4 December 14, 1901 May 10, 2446
Ext3 December 14, 1901 January 18, 2038
Ext2 December 14, 1901 January 18, 2038
XFS December 14, 1901 January 18, 2038
HFS+ January 1, 1904 February 6, 2040
NTFS January 1, 1601 May 28, 60056
FAT January 1, 1980 December 31, 2099 (December 31, 2107)

So my initial opinion is to consistently use 1970 epoch, but no strong opinion.

AkihiroSuda commented 6 years ago

Any thought for timestamp epoch?

stevvooe commented 6 years ago

Any thought for timestamp epoch?

Use proper time types, ie time.Time{}.

AkihiroSuda commented 6 years ago

Use proper time types, ie time.Time{}.

How to apply when it is before 19011214 (especially zero)