I noticed an interesting problem in Lua scripts while working on the Chat plugin.
The default for the locale seems to be the United States, because if you start MUSHclient (with Lua as the scripting language) and type:
Now this might seem OK if you live in the USA, however the date there is MM/DD/YY which is not what we use in Australia and other parts of the world.
In my case if I then type:
Now it has set the locale to Australia. Now getting the date gives a different result:
This is now DD/MM/YY which is the local convention.
Thus scripters might want to consider putting:
... at the start of Lua scripts (that display dates/times etc.) to set the locale correctly.
The default for the locale seems to be the United States, because if you start MUSHclient (with Lua as the scripting language) and type:
/print (os.date ("%x")) --> 12/24/05
Now this might seem OK if you live in the USA, however the date there is MM/DD/YY which is not what we use in Australia and other parts of the world.
In my case if I then type:
/print (os.setlocale ("", "time")) --> English_Australia.1252
Now it has set the locale to Australia. Now getting the date gives a different result:
/print (os.date ("%x")) --> 24/12/05
This is now DD/MM/YY which is the local convention.
Thus scripters might want to consider putting:
os.setlocale ("", "time")
... at the start of Lua scripts (that display dates/times etc.) to set the locale correctly.