2024-04-28 17:10:04 +01:00
|
|
|
---
|
|
|
|
id: l29u
|
|
|
|
title: Time_and_computers
|
|
|
|
tags: []
|
2024-04-28 17:20:06 +01:00
|
|
|
created: Sunday, April 28, 2024
|
2024-04-28 17:10:04 +01:00
|
|
|
---
|
2024-04-28 17:20:06 +01:00
|
|
|
|
2024-04-28 17:10:04 +01:00
|
|
|
# Time_and_computers
|
|
|
|
|
2024-04-28 17:20:06 +01:00
|
|
|
## Epochs and Unix Time
|
|
|
|
|
|
|
|
An epoch is a period of time identified by a starting point.
|
|
|
|
|
|
|
|
The standard epoch for measuring against is known colloqially as "Unix Time":
|
|
|
|
midnight on 1st January 1970. Unix time is the number of seconds that have
|
|
|
|
elapsed since this point. This is the standard for Windows and most unix
|
|
|
|
systems.
|
2024-04-28 17:10:04 +01:00
|
|
|
|
2024-04-28 17:20:06 +01:00
|
|
|
For example midnight on 2nd January 1970 would be 86400 seconds since the epoch.
|
|
|
|
The deduction is as follows:
|
2024-04-28 17:10:04 +01:00
|
|
|
|
2024-04-28 17:20:06 +01:00
|
|
|
```
|
|
|
|
60 * 60 * 24 = 86400
|
|
|
|
```
|
2024-04-28 17:10:04 +01:00
|
|
|
|
2024-04-28 17:20:06 +01:00
|
|
|
We are multiplpying the number of seconds in a minute by the number of minutes
|
|
|
|
in an hour by the number of hours in a day.
|