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

storage_file_collection_time_utc not honored, instead midnight is default #18586

Closed
BrandtWoolf opened this issue Mar 22, 2019 · 0 comments · Fixed by #18585
Closed

storage_file_collection_time_utc not honored, instead midnight is default #18586

BrandtWoolf opened this issue Mar 22, 2019 · 0 comments · Fixed by #18585

Comments

@BrandtWoolf
Copy link
Contributor

Currently the storage_file_collection_time_utc setting is not honored, instead the seconds setting is disregarded and its just sets the time to midnight utc.

Default Setting:

...
:workers:
  ...
  :worker_base:
    ...
    :schedule_worker:
       ...
       :storage_file_collection_time_utc: 21600
...

Current operation of adding the seconds to the current date being disregarded:

irb(main):061:0> at=21600
=> 21600
irb(main):062:0> Time.now.strftime("%Y-%m-%d #{at}").to_time(:utc)
=> 2019-03-22 00:00:00 UTC

Suggested changes to support adding the defined seconds to the beginning of the current day:

irb(main):061:0> at=21600
=> 21600
irb(main):063:0>Time.zone.today.to_time(:utc) + at.seconds
=> 2019-03-22 06:00:00 UTC

This was the simplest change but it might be worth adjusting the default setting to more align with other time settings and define it as x.seconds

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.

1 participant