Epoch time reported in different units in backend vs frontend #5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Javascript Date objects are created with Unix epoch milliseconds and, by default, report the epoch time of a Date in milliseconds.
Go's time package is much more flexible, providing a number of Unix* methods to access the epoch time in different units, including milliseconds.
It's a simple enough conversion (multiply/divide by 1000 depending on which way you're going) but that feels unnecessarily fragile.
Standardize date formatto Epoch time reported in different units in backend vs frontend