| TimeSourceFromSystemTime Method |
Converts the specified system time to the same form as the time value originated from this time source.
Namespace:
NLog.Time
Assembly:
NLog (in NLog.dll) Version: 5.3.4+73d83d3161d31288ca5c554cc50d27b6bed5f28b
Syntax public abstract DateTime FromSystemTime(
DateTime systemTime
)
Public MustOverride Function FromSystemTime (
systemTime As DateTime
) As DateTime
Dim instance As TimeSource
Dim systemTime As DateTime
Dim returnValue As DateTime
returnValue = instance.FromSystemTime(systemTime)
abstract FromSystemTime :
systemTime : DateTime -> DateTime
Parameters
- systemTime
- Type: SystemDateTime
The system originated time value to convert.
Return Value
Type:
DateTime
The value of
systemTime converted to the same form
as time values originated from this source.
Remarks
There are situations when NLog have to compare the time originated from TimeSource
to the time originated externally in the system.
To be able to provide meaningful result of such comparisons the system time must be expressed in
the same form as TimeSource time.
Examples:
- If the TimeSource provides time values of local time, it should also convert the provided
systemTime to the local time.
- If the TimeSource shifts or skews its time values, it should also apply
the same transform to the given systemTime.
See Also