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

Logger timestamps are incorrect when system time zone is not on hour boundary #2301

Closed
xofe opened this issue Jan 11, 2017 · 3 comments
Closed

Comments

@xofe
Copy link

xofe commented Jan 11, 2017

Read first: https://github.com/gorhill/uBlock/blob/master/CONTRIBUTING.md

Describe the issue

Entry timestamps in the logger are incorrect when the system time zone's UTC offset is not on an hour boundary (e.g. Newfoundland Time Zone at -03:30 UTC, Nepal Standard Time at +05:45 UTC).

One or more specific URLs where the issue occurs

N/A

Screenshot in which the issue can be seen

N/A

Steps for anyone to reproduce the issue

  1. Set the system time zone to one of the above-mentioned.
  2. Open the logger, and take any action that adds new entries to the logger (e.g. open https://github.com/gorhill/uBlock/ in a new tab)
  3. Notice the timestamps of the new logger entries (specifically the minute value) do not match the current time.

Fix seems trivial: using getUTCMinutes() rather than getMinutes() in line 546 of /src/js/logger-ui.js gives the correct timestamp, since the offset is already applied via setTime().

Your settings

[If you fail to provide this info, I will mark the issue as invalid. Lists all settings which differs from default settings]

  • Browser/version: Firefox 51, Chromium 57
  • uBlock Origin version: 1.10.4, 1.10.5b9
Your filter lists

N/A

Your custom filters (if any)
@lewisje
Copy link

lewisje commented Jan 12, 2017

Consider making the PR yourself.

@gorhill
Copy link
Owner

gorhill commented Jan 12, 2017

Thanks for investigating the source of the issue.

@xofe
Copy link
Author

xofe commented Jan 26, 2017

Confirmed fixed in 1.10.7rc0. 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