public override void SetTimeManually(DateTime time) { var config = new CameraDateTimeSetter(true) { TimeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById("UTC"), UTCDate = new IPCameraDate(time.Year, time.Month, time.Day), UTCTime = new IPCameraTime(time.Hour, time.Minute, time.Second) }; _camera.DateAndTime.SetAttributes(config); _camera.DateAndTime.RefreshProperties(); Log.Write("Camera time changed: " + _camera.DateAndTime.ToString()); }
public override void SetTime(TimeZoneInfo zone) { var time = DateTime.UtcNow; var config = new CameraDateTimeSetter(true) { TimeZoneInfo = zone, UTCDate = new IPCameraDate(time.Year, time.Month, time.Day), UTCTime = new IPCameraTime(time.Hour, time.Minute, time.Second) }; _camera.DateAndTime.SetAttributes(config); _camera.DateAndTime.RefreshProperties(); Log.Write("Camera time changed: " + _camera.DateAndTime.ToString()); }
public override void SetTimeManually(DateTime time) { var config = new CameraDateTimeSetter(true) { TimeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById("UTC"), UTCDate = new IPCameraDate(time.Year, time.Month, time.Day), UTCTime = new IPCameraTime(time.Hour, time.Minute, time.Second) }; _camera.DateAndTime.SetAttributes(config); _camera.DateAndTime.RefreshProperties(); Log.Write("Camera time changed: " + _camera.DateAndTime.ToString()); }
public override void SetTime(TimeZoneInfo zone) { var time = DateTime.UtcNow; var config = new CameraDateTimeSetter(true) { TimeZoneInfo = zone, UTCDate = new IPCameraDate(time.Year, time.Month, time.Day), UTCTime = new IPCameraTime(time.Hour, time.Minute, time.Second) }; _camera.DateAndTime.SetAttributes(config); _camera.DateAndTime.RefreshProperties(); Log.Write("Camera time changed: " + _camera.DateAndTime.ToString()); }