Class SmppTime
Represents time definitions described in SMPP protocol.
public static class SmppTime
- Inheritance
-
SmppTime
- Inherited Members
Methods
Format(DateTime)
Formats the given date time as absolute SMPP time.
public static string Format(DateTime dateTime)
Parameters
dateTimeDateTimeThe date time.
Returns
- string
The formatted value.
Format(DateTimeOffset)
Formats the given date time as absolute SMPP time.
public static string Format(DateTimeOffset dateTime)
Parameters
dateTimeDateTimeOffsetThe date time.
Returns
- string
The formatted value.
Format(TimeSpan)
Formats the given date time as SMPP time relative to SMSC local time.
public static string Format(TimeSpan timeSpan)
Parameters
timeSpanTimeSpanThe time span.
Returns
- string
The formatted value.
Exceptions
- ArgumentNullException
Thrown when
timeSpanlonger than 10000 days.
Format(TimeSpan, DateTimeOffset)
Formats the given date time as SMPP time relative to SMSC local time.
public static string Format(TimeSpan timeSpan, DateTimeOffset localTime)
Parameters
timeSpanTimeSpanThe time span.
localTimeDateTimeOffsetSMSC local time.
Returns
- string
The formatted value.
Exceptions
- ArgumentNullException
Thrown when
timeSpanlonger than 10000 days.
TryParse(string, out DateTimeOffset, DateTimeOffset?)
Attempts to parse a DateTimeOffset from the given SMPP time string.
public static bool TryParse(string dateValue, out DateTimeOffset data, DateTimeOffset? localTime = null)
Parameters
dateValuestringThe SMPP time string.
dataDateTimeOffset[out] The data.
localTimeDateTimeOffset?The local time for parsing given relative
dateValue.
Returns
- bool
True if it succeeds, false if it fails.