cjnaz / rclonesync-V2

A Bidirectional Cloud Sync Utility using rclone
MIT License
355 stars 39 forks source link

Timezone handling #32

Closed adempewolff closed 4 years ago

adempewolff commented 5 years ago

I just discovered a rather disruptive issue from a couple months ago that had gone unnoticed.

On July 21, my logs show that suddenly the script thought every single file on both path1 and path2 had newer versions.

2019-07-21 11:00:01,481:  ***** BiDirectional Sync for Cloud Services using rclone *****
2019-07-21 11:00:01,502:  Synching Path1  <remote path (Box)>  with Path2  <local path>
2019-07-21 11:00:44,921:    4263 file change(s) on Path1:    0 new, 4263 newer,    0 older,    0 deleted
2019-07-21 11:00:44,957:    4263 file change(s) on Path2:    0 new, 4263 newer,    0 older,    0 deleted
2019-07-21 11:00:44,957:    WARNING    Changed in both Path1 and Path2   - <path>.xlsx
2019-07-21 11:00:44,958:    Path2      Copying to Path1                  - <path>.xlsx_Path2
2019-07-21 11:00:51,487:    Path1      Renaming Path1 copy               - <path>_Path1

I don't have contemporaneous copies of the LSL files to figure out exactly what happened, but I suspect that it was probably due to me changing the system timezone as it was on the second day of a business trip and I remember changing the timezone in the gnome control panel as it wasn't updating correctly.

A couple questions/comments:

Given that it went unnoticed for so long, I don't have an excellent memory or logs for exactly what happened, but I'm happy to try and provide additional documentation of the issue as requested. Next week I may have time to try and set up a reproducible example.

cjnaz commented 5 years ago

Sounds plausible. I live in Arizona, USA which doesn't switch daylight saving time, and I suspect there may be a problem then too. I'm simply using times reported by rclone lsl. Perhaps there is a Zulu time switch available.

On Mon, Sep 16, 2019, 6:56 PM Austin Dempewolff notifications@github.com wrote:

I just discovered a rather disruptive issue from a couple months ago that had gone unnoticed.

On July 21, my logs show that suddenly the script thought every single file on both path1 and path2 had newer versions.

2019-07-21 11:00:01,481: BiDirectional Sync for Cloud Services using rclone 2019-07-21 11:00:01,502: Synching Path1 <remote path (Box)> with Path2 2019-07-21 11:00:44,921: 4263 file change(s) on Path1: 0 new, 4263 newer, 0 older, 0 deleted 2019-07-21 11:00:44,957: 4263 file change(s) on Path2: 0 new, 4263 newer, 0 older, 0 deleted 2019-07-21 11:00:44,957: WARNING Changed in both Path1 and Path2 - .xlsx 2019-07-21 11:00:44,958: Path2 Copying to Path1 - .xlsx_Path2 2019-07-21 11:00:51,487: Path1 Renaming Path1 copy - _Path1

I don't have contemporaneous copies of the LSL files to figure out exactly what happened, but I suspect that it was probably due to me changing the system timezone as it was on the second day of a business trip and I remember changing the timezone in the gnome control panel as it wasn't updating correctly.

A couple questions/comments:

-

Does this sound like a plausible explanation for what happened?

If so, as an interim fix, perhaps add a failsafe (similar to the delete more than 50% of files) for seeing newer versions of every file on both paths.

Given that it went unnoticed for so long, I don't have an excellent memory or logs for exactly what happened, but I'm happy to try and provide additional documentation of the issue as requested. Next week I may have time to try and set up a reproducible example.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cjnaz/rclonesync-V2/issues/32?email_source=notifications&email_token=ADRKVYNEE5F3JAFIT5DE5XTQKA2NDA5CNFSM4IXJMUX2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HLXKJLQ, or mute the thread https://github.com/notifications/unsubscribe-auth/ADRKVYJOV6EQC6R5EWKEZM3QKA2NDANCNFSM4IXJMUXQ .

cjnaz commented 4 years ago

Added all-prior-files-changed trap in v2.10.