public WriteToCache( ILogger logger, IZoneProvider zoneProvider, IAppCache cache, IAdapter adapter) { _logger = logger; _cache = cache; _zoneProvider = zoneProvider; _adapter = adapter; }
public TimeController( ILogger logger, ITimeProvider timeProvider, IZoneProvider zoneProvider, IMediator mediator) { _logger = logger; _timeProvider = timeProvider; _zoneProvider = zoneProvider; _mediator = mediator; }
public static DateTimeOffset ToEquipmentLocalTime(this long unixSeconds, IZoneProvider timezone) { return(ToEquipmentLocalTime(DateTimeOffset.FromUnixTimeSeconds(unixSeconds), timezone)); }
public static DateTimeOffset ToEquipmentLocalTime(this DateTimeOffset utcDateTime, IZoneProvider timezone) { var dateTimeAtSite = ZonedDateTime.FromDateTimeOffset(utcDateTime).WithZone(timezone.DateTimeZone); return(dateTimeAtSite.ToDateTimeOffset()); }