lua-users home
lua-l archive

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


On Tue, Mar 28, 2017 at 8:21 PM, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:

> TZ = os.difftime(os.time(os.date("*t", 0)), os.time(os.date("!*t", 0)))

This assumes that the time zone bias now is equal to what it was at the epoch time.

Secondly, this assumes further that the bias does not change between the two calls to os.date(). Which in my time zone could have been violated about three days ago.

Cheers,
V.