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

Make the arguments of os.epoch, time and day case-insensitive #537

wants to merge 2 commits into
base: master


Copy link

@Luca0208 Luca0208 commented Apr 7, 2018

I don't see any reasons why the arguments of os.epoch should be case-sensitive.
This could be a problem especially with UTC when people try os.epoch("UTC"), but I think it would also make sense for "local" and "ingame" to be checked case-insensitive.

@Luca0208 Luca0208 force-pushed the Luca0208:epoch-change branch from 2e90e2e to abd80d3 Apr 7, 2018
Copy link

@SquidDev SquidDev commented Apr 7, 2018

It might be worth doing .toLowerCase(Locale.ROOT) instead (or Locale.ENGLISH) so you don't get strange behaviour on non-English systems. This change should probably be made to os.time and as well (oh goodness, who thought the time changes were a good idea?).

@Luca0208 Luca0208 changed the title Make the arguments of os.epoch case-insensitive Make the arguments of os.epoch, time and day case-insensitive Apr 7, 2018
Copy link
Contributor Author

@Luca0208 Luca0208 commented Apr 13, 2018

Also if there is any reason to keep the arguments case-sensitive I would suggest to at least allow "UTC" and "utc"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.