Get the Current Unix Time
·
96 words
·
1 minute read
This is a simple way to get the current system time in the unix format and in this example we’re just printing the result to screen. This is all accessible from the time
package. The Unix()
function will actually return a type of Time
(which is the stored time to the nanosecond) - but this can be converted into an int or formatted into a readable string.
|
|