-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
time: Time has different precision depending on the operating system #41087
Comments
What about time stamps received from file systems? The reason I ask is different file systems support different levels of precision so the fidelity of an os.FileInfo is dependant on which file system the file is referenced from. Istm that in both the time now case and the os fileinfo case the only thing that can be documented is the precision of the time stamp value is operating system dependant. |
How did you measure that? Because it is about 1 millisecond, if you use time.Sleep function. I agree with @davecheney - it is too complicated to explain. And what happens, if things will change in time? The only thing we can document that it is Alex |
@davecheney Filesystems are IO. I don't think we can do much. Same for databases (postgreSQL does support micro second precision only). @alexbrainman I didn't but peterGo on the mailing list mentioned it. I think we can improve the documentation mentioning the time precision can be different depending on the os |
I don't think it is the precision of |
#### Summary In Go the precision for `time.Now` depends on the operating system... golang/go#41087 This is the minimum required fix to get this functionality working
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Has different time precisions depending on the operating system it is being ran.
What did you expect to see?
Either the same time precision or the mention of these differences in the documentation of the package
time
The text was updated successfully, but these errors were encountered: