TimeZone setting during install

@dalto
If I create a file at 01:58 on the night the clocks change. Then i make another file 4mins later but after i put clocks back to 01:00 LS would show the second file as 01:02.
Is that that not correct?

From what you say i assume that Linux (Unix/POSIX) file timestamps must be seconds since the Linux Epoc then. So in my example above my second file would be 240 (ish) seconds greater?

All time points (date+time) on a POSIX-compliant system are internally stored as either seconds or nanoseconds elapsed since the Epoch (1970-01-01 00:00 UTC).

If you make a file 4 minutes after another file, the difference in times between those two files is exactly that, 4 minutes (240 seconds). It doesn’t matter when you do it, what your timezone is, or whether daylight saving is in effect. It also doesn’t matter whether you changed any of these settings between making those two files, as long as you haven’t touched your system clock. These settings merely affect how times and dates are displayed in human readable form.

1 Like

It depends how you “put the clocks back”

If you do that by changing the timezone(or by using a timezone that accounts for the change), the first file will now show as 00:58 and the second file will show as 1:02. Still four minutes apart.

If you do that by actually changing the system time, then the first file will show 1:58 and the second will show 1:02. That is why you shouldn’t change your system time in that situation.

1 Like

Thanks @Kresimir,
now i see.

1 Like

Thanks @dalto, now i can see how “older than” really dos mean that plus the warning regarding not changing the system time which is certainly worth repeating - not that i would ofc.

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.