Respect TZ for op.valid_from/valid_until in Order Data Export

This commit is contained in:
Martin Gross
2023-04-26 10:17:12 +02:00
parent f6890e0e65
commit bca3d182ff

View File

@@ -688,8 +688,8 @@ class OrderListExporter(MultiSheetListExporter):
row += [
_('Yes') if op.blocked else '',
date_format(op.valid_from, 'SHORT_DATETIME_FORMAT') if op.valid_from else '',
date_format(op.valid_until, 'SHORT_DATETIME_FORMAT') if op.valid_until else '',
date_format(op.valid_from.astimezone(tz), 'SHORT_DATETIME_FORMAT') if op.valid_from else '',
date_format(op.valid_until.astimezone(tz), 'SHORT_DATETIME_FORMAT') if op.valid_until else '',
]
row.append(order.comment)
row.append(order.custom_followup_at.strftime("%Y-%m-%d") if order.custom_followup_at else "")