Skip to content

Conversation

Luca0208
Copy link
Contributor

@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.

@SquidDev
Copy link
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 Make the arguments of os.epoch case-insensitive Make the arguments of os.epoch, time and day case-insensitive Apr 7, 2018
@Luca0208
Copy link
Contributor Author

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants