DateTimeExtensions Class
Definition
Namespace: DataStandardizer.Chronology
Extension methods that convert a DateTime to the system-time types UnixTime and DosDateTime.
public static class DateTimeExtensions
Remarks
ToUnixTime treats the DateTime as UTC; ToDosDateTime treats it as local time and packs the year, month, day, hour, minute, and second into the DOS format.
Methods
Extension
| Method | Extends | Returns | Notes |
|---|---|---|---|
ToDosDateTime() | DateTime | DosDateTime | DateTime assumed to be local time. |
ToUnixTime() | DateTime | UnixTime | DateTime assumed to be UTC. |
Applies to
Targets netstandard1.0, netstandard2.0, net8.0, and net10.0.