Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rodrigoaasm opened this issue Jul 12, 2024 · 2 comments

Comments

@rodrigoaasm
Copy link

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
Copy link
Owner

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
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants