-
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
Site uses local time instead of Unix time #10
Comments
Thank you so much for the feedback! ClassClock is intended to be used within the local area of each participating school. Maybe i'm missing something, but at this point I don't see any planned or current use cases that would require times to be accurate across multiple timezones. Did you have a particular situation in mind in which timezones would be an issue? |
There's a couple possibilities that may cause some issues/inaccuracies:
The last one was brought to my attention when I gave the site to my friend in Canada (who is in EST). When being accessed in EST, the time was ahead by 3 hours. Perhaps there could be a query string in the URL to specify the school? The URL: https://classclock.app?school=[name of school] could be used to specify what school schedule to use. If there is no query string in the URL, then ClassClock would use the schedule of the closest school. |
Thanks for clarifying! Point 1 Point 2 RE: Multiple schools I am currently working on migrating the school schedule information to a database in order to allow multiple schools to add their schedules at some point in the future, however if you would like to submit a pull request to help expedite the implementation of this feature, feel free to do so! If you would like, I also have a slack workspace (invite linked at the bottom of the classclock.app webpage) for discussing the development of classclock and interacting with others who are interested in following ClassClock's progress. Thanks again for your feedback! |
Ok, so this feature kinda got lost in the react rewrite, partly because i've not been entirely sure about whether this is something that all users are going to want to use. However I just had the idea to potentially implement this as a user-selectable in the app and/or prompt that the user receives whenever the school's timezone doesn't match the users current timezone. Say ClassClock detects that the school was set up in PST and the user is in a different timezone (EST). The selection would offer the user two options:
For example, the second option would be useful for a parent who is on a work trip and wants to know when they should call their child in order to have them pick up during their lunch period and not during class. |
Considering the previous attempts at this were using moment, it seems like this article may be worth looking at, as well as Luxon's docs on how it compares to moment it seems like Luxon is a better bet for this. Especially since relative time seems to now be supported by browsers, which from the comparison to moment, seems like it hasn't yet been implemented in Luxon, but it is. This would require a pretty substantial refactoring of some of the code to use UTC behind the scenes and set up a conversion "layer" to "translate" times as they pass to or from the UI. As for the other side of the coin:
Edit: Migrated to Luxon as of 50bb237 |
Looking back, these options seem a bit backwards and may not be the most user friendly way to present it. A better option may be to have the options be:
|
When accessing the website in a timezone other than PST (Pacific Standard Time), the site incorrectly uses the local time.
Steps to Reproduce
How to Fix
Utilize Unix time rather than local time
The text was updated successfully, but these errors were encountered: