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

Report schedule local time support #1258

Open
suridaddy opened this issue Jun 18, 2020 · 4 comments
Open

Report schedule local time support #1258

suridaddy opened this issue Jun 18, 2020 · 4 comments

Comments

@suridaddy
Copy link

suridaddy commented Jun 18, 2020

Environment:

  • OpenShift v4.2

Description

Metering report is leveraged by us to generate daily, weekly and monthly report, and we found that the report always generated at UTC 0:0:0 time.

It's expected to generate the report at local time(Asia/Shanghai, UTC+8) 0:0:0. For the daily and weekly report, we can leverage the 'hour' setting(set hour: 16 of the day, or last day of week).
For the monthly report, it's hard to know what's the last day of the month, so, the workaround doesn't work.

My question:

is it possible to make the report generated using local time 0:0:0? do we have a way to set the timezone info to the reporting-operator pod/container, or set timezone info to the report definition?

@suridaddy
Copy link
Author

@chancez am i right to ask you for help on such 'report time' related case ?
or do you know who can help to provide some guide?

@pruan-rht
Copy link
Contributor

@suridaddy Chance does not work for RHT anymore... @timflannagan1 can you help answer @suridaddy's question? Thanks!

@timflannagan
Copy link
Contributor

@suridaddy sorry for the slow response, I've been pretty tied up recently - in terms of any localized TZ support, I'm not aware of any. I believe we do all of the UTC timestamp processing as cron expressions under-the-hood. Can you tell me more about why you wouldn't be able to use the hour workaround for monthly reports like you were using for the weekly ones?

@suridaddy
Copy link
Author

suridaddy commented Jul 21, 2020

@timflannagan1 sorry, i didn't notice your message, and sorry for late response.

Let me explain more as below,
I want to get the monthly report at (my timezone) 0:00 AM.

  • If my time is later than the UTC time(like, UTC-2), it's fine, i can specify hour: 2 of the first day of the month for monthly report to get the monthly report at 0:00 of my time(UTC-2).

  • But, my time is earlier than the UTC time(UTC+8). that means, if i want to get the monthly report (at 0:00, my time), i have to specify hour: 16 of the last day of the month in the report definition.
    The last day of one month may be 28, 29, 30, or 31. i don't find a way to specify the last day of month in the report definition, that's why i say i can't use hour workaround for monthly reports.

Freely let me know if it's not clear, thanks.

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

No branches or pull requests

3 participants