-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
Bug in os.time? #203
Comments
I'm able to confirm/replicate. Checking arguments to debugged with: a=Date
Date = function() { console.log(arguments) } which shows:
And verified that So the issue is likely in Line 438 in eb2453c
(new a(2065,7,1,12,0,0))/1000 returns the number 3016317600 as expected.So the error must come from lua_pushinteger . Which makes sense: fengari only supports (signed) 32bit integers (https://github.com/fengari-lua/fengari#integers) and this timestamp is out of range.
I'm not sure what the fix should be. |
I understand, but right now we have fengari with a top limit date and it is not so far in the future. Any app using dates will have problems pass 2030 or something like that |
Would it be easy to modify your application to use |
Thanks a lot, I will use that |
Hi, I am using fengari to create a client side framework, but I have noticed os.time fails with some valid dates.
os.time({year=2065, month=8, day=1})
gives TypeError: invalid argument
Any date with a year above 2030 fails. Is this a bug?
I tried this in standard lua and it doesn't fail.
By the way, great job, I love fengari
The text was updated successfully, but these errors were encountered: