lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I was browsing through the code for os.date and spotted the extra feature - not mentioned in the book, but in the reference manual, that you can use "!" as the first character to use UTC rather than local time.

However if you use that character only, rather than get the default date string (%c) in UTC format you get an error about the format being too long:

print (os.date ("!")) --> 'date' format too long

That message is slightly confusing. Perhaps:

* Change to %c if the string is empty after removing the !

or

* Give an error 'no date string' or similar if the string is empty after removing the !

- Nick