BUILD: lua: replace timegm() with my_timegm() to fix build on Solaris 10

Akhnin Nikita reported that Lua doesn't build on Solaris 10 because
the code uses timegm() to parse a date, which is not provided there.
The recommended way to implement timegm() is broken in the man page,
as it is based on a change of the TZ environment variable at run time
before calling the function (which is obviously not thread safe, and
terribly inefficient).

Here instead we rely on the new my_timegm() function, it should be
sufficient for all known use cases.
1 file changed