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
adding condition to run LastModified test #2308
adding condition to run LastModified test #2308
Conversation
Critic review: https://critic.hoppipolla.co.uk/r/5940 This is an external review system which you may optionally use for the code review of your pull request. In order to help critic track your changes, please do not make in-place history rewrites (e.g. via |
|
||
// Checking whether d and and new instance of Date have the same timezone. | ||
// Do not run the time zone test in the case daylight saving occurs. | ||
var d2 = new Date(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably should move these two statements after the next two ones. shouldn't affect anything, but is clearer when date_now
is the last thing executed, and future-proof
@Manishearth adding the changes |
// Do not run the time zone test in the case daylight saving occurs. | ||
var last_modified_date = new Date(last_modified); | ||
var d2 = new Date(); | ||
if (d2.getTimezoneOffset()==last_modified_date.getTimezoneOffset()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: spaces around operators
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Manishearth removed the nit. Why has the tools file been edited in my commit?
You messed up the submodule. (Also, squash the rest of your commits) |
24a7424
to
a85425e
Compare
@Manishearth I hope it is okay. |
// Do not run the time zone test in the case daylight saving occurs. | ||
var last_modified_date = new Date(last_modified); | ||
var d2 = new Date(); | ||
if (d2.getTimezoneOffset() == last_modified_date.getTimezoneOffset()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, just check if d2 and d have different timezones
a85425e
to
ef670f3
Compare
ef670f3
to
639acdb
Compare
r+ |
merge? @jgraham |
adding condition to run LastModified test
I hope the changes are okay @jgraham . Could someone tell me the reason why I have the extra diff under tools? Is it because I didn't run
git submodule update --init --recursive
again after pulling fromupstream
? Trying to solve #2300