Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change behavior of weekly update #25

Closed
ronisbr opened this issue Jul 20, 2022 · 5 comments · Fixed by #26
Closed

Change behavior of weekly update #25

ronisbr opened this issue Jul 20, 2022 · 5 comments · Fixed by #26

Comments

@ronisbr
Copy link
Contributor

ronisbr commented Jul 20, 2022

Hi @helgee !

Currently, the weekly update is equal to the Monday update. Can we change this behavior to something like this: download the file again if the file date is 7 days older than the current date?

@helgee
Copy link
Owner

helgee commented Jul 20, 2022

Sure 👍 Wanna make a PR?

@ronisbr
Copy link
Contributor Author

ronisbr commented Jul 20, 2022

Sure! Thanks :)

@ronisbr
Copy link
Contributor Author

ronisbr commented Jul 20, 2022

By the way @helgee , I think we have a problem of time zone here.

The function isoutdated compares now() with unix2datetime. The former returns the date considering the time zone locale whereas the latter returns UTC. Maybe the correct approach is to use always now(UTC). However, in this case, all the definitions (Monday, Tuesday, etc.) will be with respect to UTC instead of the local time. What do you think?

@ronisbr
Copy link
Contributor Author

ronisbr commented Jul 20, 2022

I am also wondering if we can use this PR to also change the behavior of :daily, :monthly, and :yearly. For example, using :monthly, the problem is that if a file is uploaded at March 30, then RemoteFiles will download it every time until a new version is released in April 30. I think it makes more sense if those intervals are related to the current file date instead of the beginning of the month / week / day.

I will create a PR and we can discuss on top of that.

@ronisbr
Copy link
Contributor Author

ronisbr commented Sep 10, 2022

Thanks @helgee !

Is it possible to release a new version with this modification?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants