Skip to content
This repository has been archived by the owner on Feb 29, 2020. It is now read-only.

Current time should use UTC not localtime #342

Open
grobie opened this issue Feb 14, 2015 · 7 comments
Open

Current time should use UTC not localtime #342

grobie opened this issue Feb 14, 2015 · 7 comments
Labels

Comments

@grobie
Copy link
Contributor

grobie commented Feb 14, 2015

As a user,
I want to send a link with the current range and until parameters set.

Current option is to click on the current date in the date picker to fill in the date + time. That time represents the user's localtime though, for example for a user in EST(UTC-05:00) setting the dashboard 5 hours into the past.

Expected:
Clicking on the date fills in the curent date+time in UTC as used by promdash.

@grobie grobie added the bug label Feb 14, 2015
@stuartnelson3
Copy link
Collaborator

this sounds reasonable to me, but this has been discussed with @juliusv before, and I believe the prometheus web client functions the same way (using localtime).

is this true, j? given that links are shared across time zones, standardizing seems to be prudent

@juliusv
Copy link
Contributor

juliusv commented Feb 16, 2015

I think the problem is that if you click on a date in the datetimepicker, it chooses the current local time, but PromDash interprets it as UTC. I.e. if I click on a date in Berlin, it sets it to 13:00 (if it's 13:00 in Berlin), but since PromDash is using UTC, that actually means 14:00 Berlin time (so PromDash will try to show data 1h in the future). What I would expect is that it's all happening in UTC, so it'd choose the current time in UTC instead of local time.

@grobie grobie changed the title Current time uses should use UTC not localtime Current time should use UTC not localtime Feb 16, 2015
@stuartnelson3
Copy link
Collaborator

-.- not sure what's going on.

the datetimepicker we're using is attempting what it thinks is the UTC time, but is incorrect.
screen shot 2015-02-18 at 12 32 47

date is the wrong time (an hour in the future), which the datetime picker is then moving back an hour to supposed UTC time.

image
(this time is an hour ahead of when I took the screencap)

sigh

@juliusv
Copy link
Contributor

juliusv commented Mar 7, 2015

On Sat, Mar 7, 2015 at 1:09 AM, Tobias Schmidt [email protected]
wrote:

Could this be related shutterstock/rickshaw#504
shutterstock/rickshaw#504 @stuartnelson3
https://github.com/stuartnelson3?

No, the problem happens in the date picker, not in Rickshaw. Clicking on a
date when no time is set yet should set the date picker to today/now in
UTC, but it sets it to today/now in local time (although the result is
actually interpreted as UTC (which it should)).

@grobie
Copy link
Contributor Author

grobie commented Mar 9, 2015

@juliusv Yeah, figured in the meantime and deleted it. The datepicker plugin is ugly to say the best. I don't know why they do all that wrapping of dates.

@grobie
Copy link
Contributor Author

grobie commented Mar 23, 2015

Bump. This is such an annoying bug, can we use a different datepicker maybe? Or fix it? Or check whether the bug was fixed in the datepicker plugin?

@juliusv
Copy link
Contributor

juliusv commented Mar 23, 2015

Perhaps, yes. For reference, this is the current one we're using:

https://github.com/tarruda/bootstrap-datetimepicker

(it has recent updates)

...and this is another one we could try out:

https://github.com/Eonasdan/bootstrap-datetimepicker

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

No branches or pull requests

3 participants