Hi
I am trying to set the MaxAge to 1 hour using following command: rclone rc options/set --json "{\"main\":{\"MaxDepth\":3},\"filter\":{\"MaxAge\":??}}" --rc-addr=<ip:port> --rc-user=<user> --rc-pass=<pass>
However, could not figure out appropriate value for MaxAge key.
Using rclone rc options/get I see that the default value is 9223372036854776000
What is the unit of this number? I made several assumptions (millisec, microsec, nanosec) and test them but no success to find the unit!
Also, I wonder if rclone uses modtime or creation time to calculate the age? It seems that It uses modtime. Am I right?
It seems that It is nanosec. However, there is some delays. For example if you set MaxAge to 10 min it will return the files with max age of 12 min as well.
Is this a bug!?
Hi ncw
Thanks for your prompt reply
I tried it with normal rclone command like rclone ls --max-age 10m. It works as expected.
However when it comes to rclone rc and passing MaxAge as json, it has some delay.
I did as follow to test:
Created a new file
Set the MaxAge rclone rc options/set --json "{\"main\":{\"MaxDepth\":3},\"filter\":{\"MaxAge\":600000000000}}" --rc-addr=<ip:port> --rc-user=<user> --rc-pass=<pass>
When you set MaxAge, rclone converts that into an absolute time at that point. So if you set MaxAge immediately before you use it, it should work I think.
Do you mean I should run rclone rc options/set before each run of rclone rc operations/list
Little confused as rclone rc options/get shows me the value that I already set for MaxAge!!
So What is the reason that I need to reset it each time?
Thanks
Thanks ncw
I can see this in the log file 2019/10/24 01:02:38 DEBUG : --max-age 1M to 2019-09-24 01:02:38.9381345 +0100 BST m=-2591999.664842999
So it just simply returns me any file with modtime greater than 2019-09-24 01:02:38
But I think rclone updates this absolute time after a while, as rclone rc operations/list finally could return correct result after ~2 min delay!
I looked at DEBUG. It seems that I made a mistake . You are right it never updates the absolute time, and keeps returning the file even if the max age passed.