Of course it isn't. Everything you do takes a measurable amount of time. From hitting enter, to the keyboard reacting to it, passing it on to the shell, which will run date
, to displaying the output on your terminal and your reading it. To get a better idea, have a look at this very nice Q&A on what exactly happens when you hit a key on your keyboard.
If we reuse the diagrams from that post:
Input
+-------------------+ +-------------+
----->| terminal emulator |-------------->| application |
+-------------------+ +-------------+
keypress character or
escape sequence
Output
+-------------+ +-------------------+
| application |-------------->| terminal emulator |
+-------------+ +-------------------+
character or
escape sequence
Each of the arrows and each of the boxes shown above represent processes that take a measurable amount of time. In the case of the date
program, the time you see is the time it got when it queried the system for the current time. The process would be something like
You hit enter --> `date` is executed -> queries current time
Again, each of the above steps (and other, smaller ones, run strace date
to get an idea) take time so no, the returned time will not be the exact moment you hit Enter.
By the time the result is printed on your terminal, the time (at the nanosecond accuracy) will have changed again. What you see is the that was returned by the system when date
asked.
However, you can actually rest assured that it is accurate enough for anything you might want to do on your computer. If you require accuracy at the nanosecond level, you're probably going to need custom-built hardware.