Click or drag to resize

ITimeService Interface

A service providing the current date or time. Very useful to decouple code from the static DateTime methods, to make code that has dependencies to date or time testable.

Namespace:  TomsToolbox.Core
Assembly:  TomsToolbox.Core (in TomsToolbox.Core.dll) Version: 1.0.70.0
Syntax
public interface ITimeService

The ITimeService type exposes the following members.

Properties
  NameDescription
Public propertyNow
Gets a DateTime object that is set to the current date and time on this computer, expressed as the local time.
Public propertyToday
Gets a DateTime object that is set to today's date, with the time component set to 00:00:00.
Public propertyUtcNow
Gets a DateTime object that is set to the current date and time on this computer, expressed as the Coordinated Universal Time (UTC).
Top
See Also