Getting UTC UNIX timestamp in Lua : <p>An API returns a timestamp as UNIX timestamp at UTC and I would like to know if this timestamp was more than <code>x</code> seconds ago. As expected, this works fine with <code>os.time() - x &gt; timestamp</code> in UTC, but blows up in other timezones.</p>

<p>Unfortunately I can't find a good way solve this in lua.</p>

<p><code>os.date</code> helpfully has the <code>!</code> prefix (e.g. <code>os.date("!%H:%M:%S")</code>) to return time at UTC, but it seems that despite the documentation stating it supports all <code>strftime</code> options, this does not support the <code>%s</code> option. I have heard people mention that this is caused by Lua compile time options for a similar issue, but changing these is not possible as the interpreter is provided by the user.</p>
