Click or drag to resize
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: 4.3.0
Syntax
public abstract DateTime FromSystemTime(
	DateTime systemTime
)

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