You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 1, 2017. It is now read-only.
In rsync, we use the node modified time in several places, sometimes even for comparisons. However, it is unreliable as different clients can be in different time zones. We need to make modified times more reliable.
One way to do this is by adding a wrapper to the fs that will lie in the middle of the current fs wrapper and the core fs. We can put a default time to use which will be UTC and allow the client to provide a time difference relative to UTC. Then, whenever we want to use modified time on the server, we use UTC, on the client we use the normal modified time (whatever fs core adds), while when we do comparisons, we convert the modified time to UTC by using what the client provides so that we can compare UTC with UTC times.
The problem is harder than this, I think, since you can't rely on the clocks in a client being accurate to each other. I can have my clock set fast, you slow, and we're toast. You'd need talk to a time server, and even then it's probably hard to get right.
In rsync, we use the node modified time in several places, sometimes even for comparisons. However, it is unreliable as different clients can be in different time zones. We need to make modified times more reliable.
One way to do this is by adding a wrapper to the fs that will lie in the middle of the current fs wrapper and the core fs. We can put a default time to use which will be UTC and allow the client to provide a time difference relative to UTC. Then, whenever we want to use modified time on the server, we use UTC, on the client we use the normal modified time (whatever fs core adds), while when we do comparisons, we convert the modified time to UTC by using what the client provides so that we can compare UTC with UTC times.
cc @humphd
The text was updated successfully, but these errors were encountered: