fix: resolve test failures from timezone conversion and interface rename

- Fix CriteriaSheetGenerator.FormatTimestamp to handle all DateTimeKind values
- Update TestWebApplicationFactory to use IAuthenticationService
- Add logger parameter to ExcelParserServiceTests
- Add SecureStoreManager to solution under /utils/ folder
This commit is contained in:
Joseph Doherty
2026-01-19 14:55:22 -05:00
parent 604bfe919c
commit 1c546c111a
13 changed files with 1388 additions and 5 deletions
@@ -176,8 +176,17 @@ public class CriteriaSheetGenerator
}
var options = _options.Value;
var timezone = TimeZoneInfo.FindSystemTimeZoneById(options.TimezoneId);
var localTime = TimeZoneInfo.ConvertTimeFromUtc(dateTime.Value, timezone);
var targetTimezone = TimeZoneInfo.FindSystemTimeZoneById(options.TimezoneId);
var dt = dateTime.Value;
// Convert to target timezone based on the source DateTime's Kind
var localTime = dt.Kind switch
{
DateTimeKind.Utc => TimeZoneInfo.ConvertTimeFromUtc(dt, targetTimezone),
DateTimeKind.Local => TimeZoneInfo.ConvertTime(dt, TimeZoneInfo.Local, targetTimezone),
// Unspecified - database values are stored in target timezone, no conversion needed
_ => dt
};
return $"{localTime:MMM dd, yyyy hh:mm:ss tt} {options.TimezoneAbbreviation}";
}