How accurate are timestamps in logs?


I’m very new to Docker, so this might be a very basic question.

I wanted to understand how accurate are the timestamps in the docker log files? Is the timestamp registered when the log was written to stdout by the application or is it registered when the log is written to the file?

Any help is appreciated.