-
Notifications
You must be signed in to change notification settings - Fork 44
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
Unable to get accurate date/time #68
Comments
@Airyzz I've created 2 examples.
Each example outputs result of And I've confirmed that the time in local development with tinygo was the only broken case. The results of these examples are below. local result
remote result
|
Alternatively, you can use the Example code result
|
According to this issue, in local worker development, TinyGo's // func ticks() float64
"runtime.ticks": () => {
return timeOrigin + performance.now();
}, |
When getting the current time with
time.Now()
we get back incorrect time. I assume this is because tinygo isn't accessing the system clock properly.Could it be possible to have some function which gets the date and time from the JavaScript side of things?
The text was updated successfully, but these errors were encountered: