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

Time zone always in UTC #43

Closed
kesnol opened this issue Mar 12, 2018 · 7 comments
Closed

Time zone always in UTC #43

kesnol opened this issue Mar 12, 2018 · 7 comments
Assignees

Comments

@kesnol
Copy link

kesnol commented Mar 12, 2018

Hello.
Great work with your reporter.

The pdf report shows the time as UTC. Is there anyway to show it in other time zone like CET?
I have already tried to change the dashboard configuration but the report always shows UTC time zone.

@IzakMarais
Copy link
Owner

IzakMarais commented Mar 12, 2018

Great work with your reporter.

Thanks! Glad you found it useful. Always interested in hearing who is using it and where, if you don't mind sharing.

This is hard coded currently.

Would you typically like to set this per dashboard as a query parameter, or would per reporter instance as a command line flag be sufficient?

@kesnol
Copy link
Author

kesnol commented Mar 13, 2018

Any of the options you propose is fine for me, maybe using a variable is more flexible.
As the developer you decide which one you like the most or the one that is easiest to implement.

Thanks!

@thnurg
Copy link

thnurg commented Apr 3, 2018

Hi Izak,
Thanks for this superb software. I suggest that the reporter get the server's local time zone, if possible, and use that as the default. The user could then override that with a query parameter.

@thnurg
Copy link

thnurg commented Apr 3, 2018

I had a wee play with the code. Simply removing the UTC(). from the time formatting lines produces a report that displays time as the server's local time. I think this should be the default behaviour since most people want to read reports that display their local time.
If you want to get fancy later on and add a time zone parameter then that would be awesome, but for now I think displaying local time is a better default behaviour than UTC.

Thanks again.

@IzakMarais
Copy link
Owner

@thnurg Thanks for the suggestion, sounds easy enough. So if the server is in UTC the behaviour stays unchanged. I will implement this when I have time, sounds like a quick and easy change.

@thnurg
Copy link

thnurg commented Apr 6, 2018

I just had a thought regarding daylight savings. Those of use who practice that needless software overhead every year will probably have had the change over the last few weeks, so I pulled a report for March 22nd. (We switched from GMT to BST on March 24th.) The report showed the time in GMT. If I generate one for today then it will show BST. Go is obviously handling the server's timezone correctly. I wondered if daylight savings might cause issues generating reports that occurred before the most recent change but am happy to report that's not the case.

@IzakMarais IzakMarais self-assigned this Apr 9, 2018
@IzakMarais
Copy link
Owner

Thanks for the test.

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

No branches or pull requests

3 participants