1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-11-19 22:55:13 +00:00

Fix month and day names under Java 17

I still don't really understand why the ROOT locale is wrong here, but
there we go. We'll need to remember to uncomment the tests on the 1.18
branch!

Also add some code to map tests back to their definition side. Alas,
this only links to the file right now, not the correct line :/.
This commit is contained in:
Jonathan Coates
2022-10-29 23:54:35 +01:00
parent b2d2153258
commit 5ee5b11995
3 changed files with 35 additions and 22 deletions

View File

@@ -494,7 +494,9 @@ public class OSAPI implements ILuaAPI
DateTimeFormatterBuilder formatter = new DateTimeFormatterBuilder();
LuaDateTime.format( formatter, format );
return formatter.toFormatter( Locale.ROOT ).format( date );
// ROOT would be more sensible, but US appears more consistent with the default C locale
// on Linux.
return formatter.toFormatter( Locale.US ).format( date );
}
}