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

Open
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@Luca0208
Contributor

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.

@SquidDev

This comment has been minimized.

Contributor

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 os.day as well (oh goodness, who thought the time changes were a good idea?).

@Luca0208 Luca0208 changed the title from Make the arguments of os.epoch case-insensitive to Make the arguments of os.epoch, time and day case-insensitive Apr 7, 2018

@Luca0208

This comment has been minimized.

Contributor

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