UnixTimeUtils Class

Version 1.1.28
.NET Framework 4.8
Namespace Skybrud.Essentials.Time.UnixTime
Assembly Skybrud.Essentials.dll
Visibility Public
Keywords Static
Inheritance Object

Static utility class with various methods for working with Unix time.

public static class UnixTimeUtils { }

Properties

Type Name Summary
Double CurrentSeconds

Returns the amount of seconds since the start of the Unix epoch - that is 1st of January, 1970 - 00:00:00 GMT.

Double CurrentMilliseconds

Returns the amount of milliseconds since the start of the Unix epoch - that is 1st of January, 1970 - 00:00:00 GMT.

Methods

FromSeconds(int) (static)

Returns an instance of DateTimeOffset based on the amount of seconds since the start of the Unix epoch - that is 1st of January, 1970 - 00:00:00 GMT.

Returns an instance of DateTimeOffset based on the amount of seconds since the start of the Unix epoch - that is 1st of January, 1970 - 00:00:00 GMT.

Returns an instance of DateTimeOffset based on the amount of seconds since the start of the Unix epoch - that is 1st of January, 1970 - 00:00:00 GMT.

Returns an instance of DateTimeOffset based on the amount of seconds since the start of the Unix epoch - that is 1st of January, 1970 - 00:00:00 GMT.

Returns the Unix timestamp for the specified timestamp. The Unix timestamp is defined as the amount of seconds since the start of the Unix epoch - that is 1st of January, 1970 - 00:00:00 GMT.

Returns the Unix timestamp for the specified timestamp. The Unix timestamp is defined as the amount of seconds since the start of the Unix epoch - that is 1st of January, 1970 - 00:00:00 GMT.