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

testSomeStuff() doesn't work if user run the tool in non-PST timezone #1

Open
shiumachi opened this issue Feb 18, 2014 · 0 comments
Open

Comments

@shiumachi
Copy link

Hi philz,

I failed to run the tool and got the following error:

expected: {"minDate":"2012-05-22T17:19:36.000Z","maxDate":"2012-05-22T17:29:36.000Z","logLines":[{"date":"2012-05-22T17:19:36.000Z","msg":" INFO A1234"},{"date":"2012-05-22T17:29:36.000Z","msg":" INFO A2345"}]} main.js:10
  actual: {"minDate":"2012-05-22T01:19:36.000Z","maxDate":"2012-05-22T01:29:36.000Z","logLines":[{"date":"2012-05-22T01:19:36.000Z","msg":" INFO A1234"},{"date":"2012-05-22T01:29:36.000Z","msg":" INFO A2345"}]} main.js:11
Uncaught Not equal! 

The root cause is that testSomeStuff() compares PST time with UTC time.
https://github.com/philz/logvizjs/blob/master/js/main.js#L194

I lives in JST timezone (Tokyo), so this test code always fails.

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

1 participant