rvirding / luerl

Lua in Erlang
Apache License 2.0
1.03k stars 141 forks source link

The os.time function generates a current epoch timestamp when given a specific date #177

Open rodrigoaasm opened 2 months ago

rodrigoaasm commented 2 months ago

Currently, the os.time function produces an epoch timestamp representing the current time even when provided with a specific date. For example:

local t_date = {
    year = 2014,
    month = 07,
    day = 01,
    hour = 10,
    min = 49,
    sec = 30,
    isdst = false
}
local timestamp = os.time(t_date)

The code was executed in a Lua interpreter and worked as expected.

rvirding commented 2 months ago

Yes, the has been fixed in the develop branch which has not yet been merge into the master branch. You should be able to run the develop branch without problems as this is the only real difference. Generally the develop branch is quite safe to use

rvirding commented 2 months ago

OK, I have merged develop into master and it works as it should. It is the current v1.2.0