Update utility.c

This commit is contained in:
kruftindustries 2025-12-22 07:17:30 -06:00 committed by GitHub
parent fbb6e43e11
commit 075324df9b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -427,6 +427,9 @@ lxw_datetime_to_excel_date_with_epoch(lxw_datetime *datetime,
int days = 0;
int i;
if (lxw_datetime_validate(datetime) != LXW_NO_ERROR)
return 0.0;
/* For times without dates set the default date for the epoch. */
if (!year) {
if (!use_1904_epoch) {