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

Add Support for Timezones #12

Closed
wants to merge 48 commits into from
Closed

Add Support for Timezones #12

wants to merge 48 commits into from

Conversation

nickthegroot
Copy link
Collaborator

Fixes #10

they are basically just duplicate info anyways
@nickthegroot nickthegroot changed the base branch from master to v1.1rc February 25, 2019 01:04
@nickthegroot nickthegroot reopened this Feb 25, 2019
Copy link
Owner

@MoralCode MoralCode left a 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()
}
}
Copy link
Owner

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

Copy link
Owner

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") }
Copy link
Owner

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

Copy link
Owner

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

@MoralCode
Copy link
Owner

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.

@MoralCode MoralCode closed this Dec 4, 2019
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

Successfully merging this pull request may close these issues.

2 participants