-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add Support for Timezones #12
Conversation
they are basically just duplicate info anyways
to compare adoption between schools
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.
this looks good. just a couple bug fixes to fix the functionality.
in terms of merging, I think we should hold off until the next release since the v1.1rc
branch is for final testing and bug fixes before releasing to master
} else { | ||
currentDate = moment() | ||
} | ||
} |
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.
the updateTime() method is intended for updating the time in general (i.e. for the local time clock). I think it would be better to use moment to convert to and from GMT when storing and retrieving the times
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.
also, if i'm understanding this correctly, I think this might show the local time at the school instead of the users local time if there is a school selected
} | ||
|
||
|
||
/** | ||
* @returns the current time as a formatted string | ||
*/ | ||
function getCurrentTimeString() { return currentDate.toLocaleString('en-US', { hour: 'numeric', minute: 'numeric', second: 'numeric', hour12: !use24HourTime }) } | ||
function getCurrentTimeString() { return use24HourTime ? currentDate.format("h:mm:ss a") : currentDate.format("H:mm:ss") } |
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.
I think you have the 12 and 24 hour conditions reversed here
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.
also, i think AM/PM should be capitalized
as mentioned in #10 (comment), this change kinda got lost in the react rewrite, making this pull request no longer applicable to the current React-ified version of the codebase. |
Fixes #10