A Clock API allows for independence of the DateTime.now method making it possible to control time information for a single request ( all actions in the same request happened at the same logic time) allowing for posterior auditing.
A Clock API also allows to handle time in different timezones and in the present of daylight saving scenarios.
Finally code has better testability since you control the time at which operations are occurring.
A Clock API allows for independence of the DateTime.now method making it possible to control time information for a single request ( all actions in the same request happened at the same logic time) allowing for posterior auditing.
A Clock API also allows to handle time in different timezones and in the present of daylight saving scenarios.
Finally code has better testability since you control the time at which operations are occurring.