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
dateTime
DateTimeThe 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
dateTime
DateTimeOffsetThe 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
timeSpan
TimeSpanThe time span.
Returns
- string
The formatted value.
Exceptions
- ArgumentNullException
Thrown when
timeSpan
longer 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
timeSpan
TimeSpanThe time span.
localTime
DateTimeOffsetSMSC local time.
Returns
- string
The formatted value.
Exceptions
- ArgumentNullException
Thrown when
timeSpan
longer 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
dateValue
stringThe SMPP time string.
data
DateTimeOffset[out] The data.
localTime
DateTimeOffset?The local time for parsing given relative
dateValue
.
Returns
- bool
True if it succeeds, false if it fails.