From the Lua manual:
If format starts with '
!
', then the date is formatted in Coordinated Universal Time. [...]If format is not "
*t
", then date returns the date as a string, formatted according to the same rules as the ANSI C functionstrftime
.
Based on this and a little documentation referencing, it's quite simple to construct a format string that resembles JavaScript's toUTCString
format.
> =os.date('!%a, %d %b %Y %H:%M:%S GMT')
Fri, 06 Dec 2013 14:27:34 GMT