C# Класс CSharpAnalytics.Protocols.EpochTime

Represents a date and time expressed as the number of seconds since 00:00 on 01-Jan-1970.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
EpochTime ( DateTimeOffset offset ) : System

Create a new EpochTime from an existing DateTimeOffset.

EpochTime ( ulong secondsSince1970 ) : System

Create a new EpochTime with a given number of seconds since the start of 1970.

ToDateTimeOffset ( ) : DateTimeOffset

Return an EpochTime as a DateTimeOffset.

ToString ( ) : string

Return a string containing the number of seconds since 1970.

ToUtcString ( ) : string

Return a string with the EpochTime represented as a UTC date format.

TryParseSeconds ( string seconds, EpochTime &epochTime ) : bool

Try and parse a string representing seconds into an EpochTime.

Описание методов

EpochTime() публичный Метод

Create a new EpochTime from an existing DateTimeOffset.
public EpochTime ( DateTimeOffset offset ) : System
offset DateTimeOffset
Результат System

EpochTime() публичный Метод

Create a new EpochTime with a given number of seconds since the start of 1970.
public EpochTime ( ulong secondsSince1970 ) : System
secondsSince1970 ulong Number of seconds since the start of 1970.
Результат System

ToDateTimeOffset() публичный Метод

Return an EpochTime as a DateTimeOffset.
public ToDateTimeOffset ( ) : DateTimeOffset
Результат DateTimeOffset

ToString() публичный Метод

Return a string containing the number of seconds since 1970.
public ToString ( ) : string
Результат string

ToUtcString() публичный Метод

Return a string with the EpochTime represented as a UTC date format.
public ToUtcString ( ) : string
Результат string

TryParseSeconds() публичный статический Метод

Try and parse a string representing seconds into an EpochTime.
public static TryParseSeconds ( string seconds, EpochTime &epochTime ) : bool
seconds string String containing number of seconds since start of 1970.
epochTime EpochTime Output parameter containing new EpochTime
Результат bool