Skip to content

Commit

Permalink
Keep original behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
vidy committed Aug 27, 2024
1 parent ff33747 commit 50df997
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions kernel/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,11 @@ void chart_writer(zend_long row, zend_long columns, xls_resource_chart_t *chart_
*/
void datetime_writer(lxw_datetime *datetime, zend_long row, zend_long columns, zend_string *format, xls_resource_write_t *res, lxw_format *format_handle)
{
if (format_handle != NULL) {
format_set_num_format(format_handle, ZSTR_VAL(format));
lxw_format *value_format = format_handle;
if (format_handle == NULL) {
value_format = workbook_add_format(res->workbook);
}
format_set_num_format(value_format, ZSTR_VAL(format));

worksheet_write_datetime(res->worksheet, (lxw_row_t)row, (lxw_col_t)columns, datetime, format_handle);
}
Expand Down

0 comments on commit 50df997

Please sign in to comment.