ComputerCraft icon indicating copy to clipboard operation
ComputerCraft copied to clipboard

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

Open Luca0208 opened this issue 7 years ago • 2 comments

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 avatar Apr 07 '18 20:04 Luca0208

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?).

SquidDev avatar Apr 07 '18 20:04 SquidDev

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

Luca0208 avatar Apr 13 '18 08:04 Luca0208