Skip to content

Commit

Permalink
Merge pull request ardalis#49 from snowfrogdev/main
Browse files Browse the repository at this point in the history
Fix issue with parsing date with hardcoded format
  • Loading branch information
ardalis authored Oct 5, 2022
2 parents 4c9ae69 + fb8980c commit 3c5100e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public async Task<DateTime> ReadAsync()
_logger.LogInformation("Read today date/time from configuration.");

var stringDateTimeOffset = await _httpService.HttpGetAsync($"api/configurations");
var dateTimeWithOffset = DateTimeOffset.ParseExact(stringDateTimeOffset, "MM/dd/yyyy HH:mm:ss zzz", CultureInfo.InvariantCulture);
var dateTimeWithOffset = DateTimeOffset.Parse(stringDateTimeOffset, CultureInfo.InvariantCulture);

return dateTimeWithOffset.UtcDateTime;
}
Expand Down

0 comments on commit 3c5100e

Please sign in to comment.