Problem UTC Windows Europe +1 summer problem

good morning, a long time ago I opened a post with this problem but since it was not the time change it was difficult to find the problem, today it was the time change to summer the clock was advanced 1 hour, the problem is that I copied some files in function of the time they were created, these are the parameters

rclone64.exe copyto "e:\backups" "e:\esync\Marc\13" --local-no-check-updated --no-traverse --max-age "2022-03-27T10:16:00+01:00"

this would have to copy the files created from 10:16 but rclone takes it as 11:16

2022/03/27 10:23:12 DEBUG : --max-age -52m47.9867057s to 2022-03-27 11:16:00 +0200 CEST m=+3168.204606601
2022/03/27 10:23:12 DEBUG : rclone: Version "v1.57.0" starting with parameters ["C:\WINDOWS\system32\Esoft\64\rclone64.exe" "copyto" "e:\backups" "e:\esync\Marc\13" "--local-no-check-updated" "--no-traverse" "--max-age" "2022-03-27T10:16:00+01:00" "--exclude" "{BKI_,.exe,BadSectors*}" "-P" "-vv"]
2022/03/27 10:23:12 DEBUG : Creating backend with remote "e:\backups"
2022/03/27 10:23:12 DEBUG : local: detected overridden config - adding "{yKcAd}" suffix to name
2022/03/27 10:23:12 DEBUG : Using config file from "C:\Users\Usuari\.config\rclone\rclone.conf"
2022/03/27 10:23:12 DEBUG : fs cache: renaming cache item "e:\backups" to be canonical "local{yKcAd}://?/e:/backups"
2022/03/27 10:23:12 DEBUG : Creating backend with remote "e:\esync\Marc\13"
2022/03/27 10:23:12 DEBUG : local: detected overridden config - adding "{yKcAd}" suffix to name
2022/03/27 10:23:12 DEBUG : fs cache: renaming cache item "e:\esync\Marc\13" to be canonical "local{yKcAd}://?/e:/esync/Marc/13"
2022-03-27 10:23:12 DEBUG : DOM/Llista_Arxius.7z: Excluded
2022-03-27 10:23:12 DEBUG : VIE/BKI_PC-BERK-L.hsh.tpm: Excluded
2022-03-27 10:23:12 DEBUG : DOM/PC-BERK-L_diff.sna.tpm: Excluded
2022-03-27 10:23:12 DEBUG : DOM/Utilitats.exe: Excluded
2022-03-27 10:23:12 DEBUG : VIE/BKI_PC-BERK-L.s10.tpm: Excluded

and for it to work well I have to put the tzone +2

2022/03/27 10:28:34 DEBUG : --max-age 12m34.3387368s to 2022-03-27 10:16:00.0005278 +0200 CEST m=-754.120706899
2022/03/27 10:28:34 DEBUG : rclone: Version "v1.57.0" starting with parameters ["C:\WINDOWS\system32\Esoft\64\rclone64.exe" "copyto" "e:\backups" "e:\esync\Marc\13" "--local-no-check-updated" "--no-traverse" "--max-age" "2022-03-27T10:16:00+02:00" "--exclude" "{BKI_,.exe,BadSectors*}" "-P" "-vv"]
2022/03/27 10:28:34 DEBUG : Creating backend with remote "e:\backups"
2022/03/27 10:28:34 DEBUG : local: detected overridden config - adding "{yKcAd}" suffix to name
2022/03/27 10:28:34 DEBUG : Using config file from "C:\Users\Usuari\.config\rclone\rclone.conf"
2022/03/27 10:28:34 DEBUG : fs cache: renaming cache item "e:\backups" to be canonical "local{yKcAd}://?/e:/backups"
2022/03/27 10:28:34 DEBUG : Creating backend with remote "e:\esync\Marc\13"
2022/03/27 10:28:34 DEBUG : local: detected overridden config - adding "{yKcAd}" suffix to name
2022/03/27 10:28:34 DEBUG : fs cache: renaming cache item "e:\esync\Marc\13" to be canonical "local{yKcAd}://?/e:/esync/Marc/13"
2022-03-27 10:28:34 DEBUG : DOM/Utilitats.exe: Excluded
2022-03-27 10:28:34 DEBUG : VIE/BKI_PC-BERK-L.hsh.tpm: Excluded
2022-03-27 10:28:34 DEBUG : VIE/BKI_PC-BERK-L.s10.tpm: Excluded
2022-03-27 10:28:34 DEBUG : VIE/BKI_PC-BERK-L.s11.tpm: Excluded
2022-03-27 10:28:34 DEBUG : VIE/BKI_PC-BERK-L.s12.tpm: Excluded
2022-03-27 10:28:34 DEBUG : DOM/Llista_Arxius.7z: md5 = 682d140baafcde7260c59add65ec1051 OK

There is no possibility of being able to configure rclone with the system time and not the own time that the program takes from I don't know where?

the problem is that if you don't have to change the tzone in the time changes

Thanks a lot

Those two times represent the same instant.

Note

10:16:00+01:00
11:16:00 +0200

They are just represented in different time zones.

If it is done at the same time and that is the problem with the automatic time change, the program does not adjust with the time change, is there a way to take the time from the system and not from the TZ?

Apparently rclone thinks your system is using +0200 time zone.

Is that not true?

However you specified the offset as +0100 in your --max-age ?

If you leave off the offset I think it will use system time.

What filing system is e: using?

Good afternoon, the timezone of Spain is +1, in winter it works well because the time does not change but in summer the clock is advanced 1 hour and this is when the problem starts, if I do not put any timezone by default it takes it as tz 0
the correct time would be 10:16:00
TZ +1
11:16:00
TZ+2
10:16:00 now it's ok because by advancing the clock 1 hour it thinks it's TZ2
TZ0 or without TZ
12:16:00

the file system is in c: and in this case it is a windows 10 professional but the same happens with windows 7, the program does not take the time of the computer as a reference, something very strange
Thank you

Here is how I find and use current local time in PowerShell (Windows 10):

$synctime = $(get-date -Format yyy-MM-ddTHH:mm:ssK)
rclone lsl . --max-age $synctime

It seems to work fine, but please test if critical in your setup.

good afternoon, I will try this way, I use it in bath but I can try to modify it to extract only the time zone since I use the date for other things and the rclone format is different
Thanks a lot

1 Like

Here are the formats that --max-age and --min-age can have from the docs:

--max-age can also be specified as an absolute time in the following formats:

  • RFC3339 - e.g. 2006-01-02T15:04:05Z or 2006-01-02T15:04:05+07:00
  • ISO8601 Date and time, local timezone - 2006-01-02T15:04:05
  • ISO8601 Date and time, local timezone - 2006-01-02 15:04:05
  • ISO8601 Date - 2006-01-02 (YYYY-MM-DD)

So specifying anything other than the first format should be using the local time zone.

However this doesn't appear to be working. Here is my double check in time zone +01:00:

$ rclone-v1.57.0 lsf -vv . --min-age "2022-03-28T15:04:05" 2>&1 | grep min-age
2022/03/28 11:56:02 DEBUG : --min-age -4h8m2.868749986s to 2022-03-28 16:04:05.000012778 +0100 BST m=+14882.899505930
2022/03/28 11:56:02 DEBUG : rclone: Version "v1.57.0" starting with parameters ["rclone-v1.57.0" "lsf" "-vv" "." "--min-age" "2022-03-28T15:04:05"]

So it looks like we are interpreting the --min-age times without a timezone as UTC not localtime.

This is easy to fix.

Can you try this

v1.59.0-beta.6045.887cccb2c.fix-min-age-timezone on branch fix-min-age-timezone (uploaded in 15-30 mins)

And then specify the date/time without a timezone to get local time.

$ rclone lsf -vv . --min-age "2022-03-28T15:04:05" 2>&1 | grep min-age
2022/03/28 11:56:32 DEBUG : --min-age -3h7m32.644655619s to 2022-03-28 15:04:05.000018168 +0100 BST m=+11252.671773493
2022/03/28 11:56:32 DEBUG : rclone: Version "v1.59.0-beta.6045.887cccb2c.fix-min-age-timezone" starting with parameters ["rclone" "lsf" "-vv" "." "--min-age" "2022-03-28T15:04:05"]

Good afternoon, now I put the poweshell parameters that Ole Frost put and for the moment with that I can solve, as soon as I have a moment I will try the rclone beta to see if the problem is solved

Thanks a lot

A double check of the beta would be great thank you

What do you think @Ole - can I just fix this discrepancy from the docs or is it a backwards compatibility can of worms?

good again, I tried the beta version removing the TZ and now it seems to work fine
rclone64.exe copyto "e:\backups" "e:\esync\Marc\13" --local-no-check-updated --no-traverse --max-age "2022-03-27T10:16:00"
2022/03/28 19:20:45 DEBUG : --max-age 1.3783095153564815d to 2022-03-27 10:16:00 +0200 CEST m=-119085.732895899
before it took by default the TZ 0
In any case, I will continue testing once the programming is finished
thank you very much to all

I agree, the code should be fixed to behave as described in the docs and the standard. It may brake a few scripts and silently fix some others. It however seems like the absolute local time options are seldomly used, otherwise we would have discovered this issue years ago. I therefore doubt we will see any issues/complaints.

I guess this cute little signature bug sneaked in during a long dark winter somewhere near Greenwich :joy:

Thanks for testing. I've merged this to master now which means it will be in the latest beta in 15-30 minutes and released in v1.59

I agree - thank you.

Ha! If I walk up the local hill on a very clear day I can see Greenwich! And I will admit that living in GMT for half the year does mean I've made that mistake before. However the cause of this particular problem was that I put the the test vectors for that bit of the code in UTC instead of localtime - duh!

Anyway, in rclone, times without timezones are always localtime is what I try to stick to.

1 Like

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