Problem UTC Windows Europe

Good morning, I am using the version of rclone 1.57.0 and I am having problems or maybe I have some wrong parameter with the commands --max-age and --min-age, I have configured this parameter
rclone64.exe ls "e: \ esync \ Desembre \ 52" --max-age "2021-12-29T17: 57: 00 + 01: 00"
You have to show me the modified files after this date, the problem is that in Europe there is an automatic time change in summer, the clock is 1 hour ahead, the problem I have is that I have to modify the utc +02 to make it work, is there any way for rclone to use windows local clock and not have to define the UTC
thank you

Welcome to the forum!

I don't think there is a way for rclone to use your current, local time zone. With duration options like --max-age, a specific time zone is always assumed - default UTC if nothing else specified as part of the value. It could be implemented, but I fear it would end up as a bit of a rabbit hole..

Perhaps you can achieve what you want with some help of your shell. Being on Windows, you can let PowerShell (.NET) do some simple timezone handling. As an illustration:

rclone64.exe ls "e:\esync\Desembre\52" --max-age "$([datetime]::new(2021,12,29,0,0,0,[System.DateTimeKind]::Local).ToString('o'))"

Good morning, thanks for the answer, the only problem is that rclon does not automatically adjust to the time change of my UTC, now for example everything works perfectly because it is the time that it touches, but in summer when going up one more hour everything stops working , unless I tell rclon that UTC is + 2, I don't know if there is any command or it can be implemented to time-check the local computer for example --localtime or something like that and not have to use UTC
thank you

I understand what you want, but unfortunately there is no --localtime. You can create a feature request on GitHub and it might be picked up, but there are limited dev resources so you should not expect it to be any time soon.

I still think you should be able to work around it with your shell or external tools. If you want more help going that route I suggest you share a bit more details of your use case. E.g. in your example you have "2021-12-29T17:57:00 +01:00" which is a specific date and zone, which I suspect is your original case?

good, if indeed I am using the local time of my computer, in the case that I have posted I am listing files created after the date
"2021-12-29T17: 57: 00 +01: 00"
the problem is that with the summer time change it becomes the
"2021-12-29T18: 57: 00 +01: 00"
but since the UTC is at +01 it doesn't change at 18 o'clock rclone is still at 17:57, if I change the UTC to +02 it works again, I don't know if I explain myself well
thank you

I understand the UTC+1/+2 summer time logic, but I can't grasp your case, unfortunately.

With --max-age "2021-12-29T17:57:00+01:00" you should always get that.

You mean when your local time zone is within summer time? Do you mean that the exact value --max-age "2021-12-29T17:57:00+01:00" gives you different result when your regional settings are in winter time (UTC+1) and summer time (UTC+2)?

Exactly, in winter the UTC is +1 and it is 17 hours but in summer the UTC is still +1 but the windows clock is 1 hour ahead and it is 18 hours, the only way I have it to work for me is to change in summer UTC manually to +2

Still somewhat confusing, but getting closer.. :blush:

Sounds like the following section from docs of time.Parse function used by rclone is relevant:

When parsing a time with a zone offset like -0700, if the offset corresponds to a time zone used by the current location (Local), then Parse uses that location and zone in the returned time. Otherwise it records the time as being in a fabricated location with time fixed at the given zone offset.

What if you always specify the exact UTC date/time, i.e. use --max-age "2021-12-29T16:57:00Z", will that work better?

this is the result with +01 or with Z
C:>C:\WINDOWS\system32\Esoft\64\rclone64.exe ls "e:\esync\Desembre\53" --max-age "2021-12-31T13:54:00+01:00" -vv
2021/12/31 14:05:37 DEBUG : --max-age 11m37.1213964s to 2021-12-31 13:54:00 +0100 CET m=-696.921143999
2021/12/31 14:05:37 DEBUG : rclone: Version "v1.57.0" starting with parameters ["C:\WINDOWS\system32\Esoft\64\rclone64.exe" "ls" "e:\esync\Desembre\53" "--max-age" "2021-12-31T13:54:00+01:00" "-vv"]
2021/12/31 14:05:37 DEBUG : Creating backend with remote "e:\esync\Desembre\53"
2021/12/31 14:05:37 DEBUG : Using config file from "C:\Users\Usuari\.config\rclone\rclone.conf"
2021/12/31 14:05:37 DEBUG : fs cache: renaming cache item "e:\esync\Desembre\53" to be canonical "//?/e:/esync/Desembre/53"
3242 VIE/Llista_Arxius.7z
3092772 VIE/PC-BERK-K.hsh.tpm
94359552 VIE/PC-BERK-K.sn1.tpm
94359552 VIE/PC-BERK-K.sn2.tpm
94339072 VIE/PC-BERK-K.sn3.tpm
94330880 VIE/PC-BERK-K.sn4.tpm
94347264 VIE/PC-BERK-K.sn5.tpm
94367744 VIE/PC-BERK-K.sn6.tpm
63803392 VIE/PC-BERK-K.sn7.tpm
94339072 VIE/PC-BERK-K.sna.tpm
2021/12/31 14:05:37 DEBUG : 2 go routines active

whit Z
C:>C:\WINDOWS\system32\Esoft\64\rclone64.exe ls "e:\esync\Desembre\53" --max-age "2021-12-31T13:54:00Z" -vv
2021/12/31 14:05:27 DEBUG : --max-age -48m32.3984194s to 2021-12-31 14:54:00 +0100 CET m=+2912.607895401
2021/12/31 14:05:27 DEBUG : rclone: Version "v1.57.0" starting with parameters ["C:\WINDOWS\system32\Esoft\64\rclone64.exe" "ls" "e:\esync\Desembre\53" "--max-age" "2021-12-31T13:54:00Z" "-vv"]
2021/12/31 14:05:27 DEBUG : Creating backend with remote "e:\esync\Desembre\53"
2021/12/31 14:05:27 DEBUG : Using config file from "C:\Users\Usuari\.config\rclone\rclone.conf"
2021/12/31 14:05:27 DEBUG : fs cache: renaming cache item "e:\esync\Desembre\53" to be canonical "//?/e:/esync/Desembre/53"
2021/12/31 14:05:27 DEBUG : VIE/Llista_Arxius.7z: Excluded
2021/12/31 14:05:27 DEBUG : VIE/PC-BERK-K.hsh.tpm: Excluded
2021/12/31 14:05:27 DEBUG : VIE/PC-BERK-K.sn1.tpm: Excluded
2021/12/31 14:05:27 DEBUG : VIE/PC-BERK-K.sn2.tpm: Excluded
2021/12/31 14:05:27 DEBUG : VIE/PC-BERK-K.sn3.tpm: Excluded
2021/12/31 14:05:27 DEBUG : VIE/PC-BERK-K.sn4.tpm: Excluded
2021/12/31 14:05:27 DEBUG : VIE/PC-BERK-K.sn5.tpm: Excluded
2021/12/31 14:05:27 DEBUG : VIE/PC-BERK-K.sn6.tpm: Excluded
2021/12/31 14:05:27 DEBUG : VIE/PC-BERK-K.sn7.tpm: Excluded
2021/12/31 14:05:27 DEBUG : VIE/PC-BERK-K.sna.tpm: Excluded
2021/12/31 14:05:27 DEBUG : 2 go routines active

I was thinking, if you convert the date you want to filter on into UTC and then supply it with Z suffix. So the following two should give same result:

--max-age "2021-12-31T13:54:00+01:00"
--max-age "2021-12-31T12:54:00Z"

But the question is, does these behave differently with regards to your original DST related issue?

yes, it behaves differently with UTC right now it works
--max-age "2021-12-31T13: 54: 00 + 01: 00"
On the other hand, with the other configuration, no
--max-age "2021-12-31T12: 54: 00Z"
If you look at the log you will see that with the Z configuration the files are excluded.

Yes, but in that example you had same clock in different time zones - hence different points in time:

13:54:00+0100 (which corresponds to 12:54:00Z)
13:54:00Z (which is +1h from the one above)

Yes, but it is a clock that takes rclone from somewhere or from some default parameter that it carries inside, without touching anything on my clock, just changing from UTC to Z only changes the time, normally the programs are based on the clock of the machine that It is executing the program and I don't know why rclone is using another type of configuration and it is what I cannot discover or do so that it takes my local time regardless of UTC or Z, this same problem does not happen to anyone with time changes ?
thank you very much for the help

Rclone uses the current time in your local time zone as reference, i.e. the clock of the machine that is executing the program. Using --max-age 0h on computer in UTC+1 zone, the debug log reports the correct current time in local zone:

--max-age 0s to 2021-12-31 15:48:19.3812779 +0100 CET m=+0.235619701

And I get the identical debug log entry if I use any of these:
--max-age 2021-12-31T15:48:19.3812779+01:00
--max-age 2021-12-31T14:48:19.3812779Z
--max-age 2021-12-31T14:48:19.3812779

1 Like

this is my result with different settings
UTC +1
rclone64.exe ls "e:\backups" --max-age "2021-12-31T15:47:00+01:00" -vv
--max-age 31m42.6784734s to 2021-12-31 15:47:00 +0100 CET m = -1902.487094499
Z
rclone64.exe ls "e:\backups" --max-age "2021-12-31T15:47:00Z" -vv
--max-age -27m31.4337323s to 2021-12-31 16: 47: 00.0005274 +0100 CET m = + 1651.629364801
This one with nothing
rclone64.exe ls "e:\backups" --max-age "2021-12-31T15:47:00" -vv
--max-age -26m59.5657337s to 2021-12-31 16:47:00 +0100 CET m = + 1619.772427501
i am using windows 10 professional

Now you give different points in time as input, and therefore the results are different as expected. 15:47 in UTC+1 is obviously not the same as 15:47 in UTC (with suffix Z or nothing you get UTC). In my example I used hour 14 for UTC and hour 15 for +1 zone to get the same results.

Not been of much help so far, I'm afraid.. :frowning:

I'm still struggling to get a clear picture of the exact issue here.

with the tests with +1 it works fine for me with the rest I get all the files as excluded
something escapes from the pro configuration I don't know what

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