Barotrauma Client Doc
Barotrauma.SerializableDateTime Struct Reference

DateTime wrapper that tries to offer a reliable string representation that's also human-friendly More...

Inheritance diagram for Barotrauma.SerializableDateTime:

Public Member Functions

bool Equals (SerializableDateTime other)
 
override bool Equals (object? obj)
 
 SerializableDateTime (DateTime value)
 
 SerializableDateTime (DateTime value, SerializableTimeZone timeZone)
 
SerializableDateTime ToUtc ()
 
SerializableDateTime ToLocal ()
 
DateTime ToUtcValue ()
 
DateTime ToLocalValue ()
 
long ToUnixTime ()
 
override string ToString ()
 
string ToLocalUserString ()
 
override int GetHashCode ()
 
int CompareTo (SerializableDateTime other)
 

Static Public Member Functions

static SerializableDateTime FromLocalUnixTime (long unixTime)
 
static SerializableDateTime FromUtcUnixTime (long unixTime)
 
static Option< SerializableDateTimeParse (string str)
 
static bool operator< (in SerializableDateTime a, in SerializableDateTime b)
 
static bool operator> (in SerializableDateTime a, in SerializableDateTime b)
 
static bool operator== (in SerializableDateTime a, in SerializableDateTime b)
 
static bool operator!= (in SerializableDateTime a, in SerializableDateTime b)
 
static SerializableDateTime operator+ (in SerializableDateTime dt, in TimeSpan ts)
 
static SerializableDateTime operator- (in SerializableDateTime dt, in TimeSpan ts)
 
static TimeSpan operator- (in SerializableDateTime a, in SerializableDateTime b)
 

Public Attributes

readonly SerializableTimeZone TimeZone
 

Properties

static SerializableDateTime LocalNow [get]
 
static SerializableDateTime UtcNow [get]
 
long Ticks [get]
 

Detailed Description

DateTime wrapper that tries to offer a reliable string representation that's also human-friendly

Definition at line 99 of file SerializableDateTime.cs.

Constructor & Destructor Documentation

◆ SerializableDateTime() [1/2]

Barotrauma.SerializableDateTime.SerializableDateTime ( DateTime  value)

Definition at line 113 of file SerializableDateTime.cs.

◆ SerializableDateTime() [2/2]

Barotrauma.SerializableDateTime.SerializableDateTime ( DateTime  value,
SerializableTimeZone  timeZone 
)

Definition at line 123 of file SerializableDateTime.cs.

Member Function Documentation

◆ CompareTo()

int Barotrauma.SerializableDateTime.CompareTo ( SerializableDateTime  other)

◆ Equals() [1/2]

override bool Barotrauma.SerializableDateTime.Equals ( object?  obj)

◆ Equals() [2/2]

bool Barotrauma.SerializableDateTime.Equals ( SerializableDateTime  other)

◆ FromLocalUnixTime()

static SerializableDateTime Barotrauma.SerializableDateTime.FromLocalUnixTime ( long  unixTime)
static

◆ FromUtcUnixTime()

static SerializableDateTime Barotrauma.SerializableDateTime.FromUtcUnixTime ( long  unixTime)
static

◆ GetHashCode()

override int Barotrauma.SerializableDateTime.GetHashCode ( )

◆ operator!=()

static bool Barotrauma.SerializableDateTime.operator!= ( in SerializableDateTime  a,
in SerializableDateTime  b 
)
static

◆ operator+()

static SerializableDateTime Barotrauma.SerializableDateTime.operator+ ( in SerializableDateTime  dt,
in TimeSpan  ts 
)
static

◆ operator-() [1/2]

static TimeSpan Barotrauma.SerializableDateTime.operator- ( in SerializableDateTime  a,
in SerializableDateTime  b 
)
static

◆ operator-() [2/2]

static SerializableDateTime Barotrauma.SerializableDateTime.operator- ( in SerializableDateTime  dt,
in TimeSpan  ts 
)
static

◆ operator<()

static bool Barotrauma.SerializableDateTime.operator< ( in SerializableDateTime  a,
in SerializableDateTime  b 
)
static

◆ operator==()

static bool Barotrauma.SerializableDateTime.operator== ( in SerializableDateTime  a,
in SerializableDateTime  b 
)
static

◆ operator>()

static bool Barotrauma.SerializableDateTime.operator> ( in SerializableDateTime  a,
in SerializableDateTime  b 
)
static

◆ Parse()

static Option<SerializableDateTime> Barotrauma.SerializableDateTime.Parse ( string  str)
static

Definition at line 189 of file SerializableDateTime.cs.

◆ ToLocal()

SerializableDateTime Barotrauma.SerializableDateTime.ToLocal ( )

◆ ToLocalUserString()

string Barotrauma.SerializableDateTime.ToLocalUserString ( )

◆ ToLocalValue()

DateTime Barotrauma.SerializableDateTime.ToLocalValue ( )

◆ ToString()

override string Barotrauma.SerializableDateTime.ToString ( )

◆ ToUnixTime()

long Barotrauma.SerializableDateTime.ToUnixTime ( )

◆ ToUtc()

SerializableDateTime Barotrauma.SerializableDateTime.ToUtc ( )

◆ ToUtcValue()

DateTime Barotrauma.SerializableDateTime.ToUtcValue ( )

Member Data Documentation

◆ TimeZone

readonly SerializableTimeZone Barotrauma.SerializableDateTime.TimeZone

Definition at line 111 of file SerializableDateTime.cs.

Property Documentation

◆ LocalNow

SerializableDateTime Barotrauma.SerializableDateTime.LocalNow
staticget

Definition at line 132 of file SerializableDateTime.cs.

◆ Ticks

long Barotrauma.SerializableDateTime.Ticks
get

Definition at line 147 of file SerializableDateTime.cs.

◆ UtcNow

SerializableDateTime Barotrauma.SerializableDateTime.UtcNow
staticget

Definition at line 135 of file SerializableDateTime.cs.