Physical Time
- Physical clock: number of seconds elapsed
- Logical clock: count events, e.g. messages sent
Standards
- Greenwich Mean Time (GMT): normal human time, based on rotation of the Earth
- International Atomic Time: some multiple of Caesium-133 resonant frequency
- UTC (is International Atomic Time with corrections to account for Earth rotation)
- Unix Time: number of seconds since the epoch (Jan 1, 1970)
- ISO8601: year, month, day, hour, minute, second, and timezone offset relative to UTC
We periodically adjust our local clocks with a server that has a more accurate time source using (NTP) or Precision Time Protocol (PTP)
Logical Time
Computers synchronize with well known time sources on the internet. Logical clocks work off of the number of events that have occurred as opposed to actual time passed.
Lamport Clocks
Provides a partial ordering on events. Two identical Lamport timestamps do not guarantee causation.
Vector Clocks
These are used to determine the partial ordering of events in a distributed system and detect causality violations. It’s an array of logical clocks, one for each node in the system. They can more accurately detect concurrent updates.