forked from CGM_Public/pretix_original
Respect TZ for op.valid_from/valid_until in checkin error messages
This commit is contained in:
@@ -740,11 +740,11 @@ def perform_checkin(op: OrderPosition, clist: CheckinList, given_answers: dict,
|
|||||||
else:
|
else:
|
||||||
raise CheckInError(
|
raise CheckInError(
|
||||||
_('This ticket is only valid after {datetime}.').format(
|
_('This ticket is only valid after {datetime}.').format(
|
||||||
datetime=date_format(op.valid_from, 'SHORT_DATETIME_FORMAT')
|
datetime=date_format(op.valid_from.astimezone(clist.event.timezone), 'SHORT_DATETIME_FORMAT')
|
||||||
),
|
),
|
||||||
'invalid_time',
|
'invalid_time',
|
||||||
_('This ticket is only valid after {datetime}.').format(
|
_('This ticket is only valid after {datetime}.').format(
|
||||||
datetime=date_format(op.valid_from, 'SHORT_DATETIME_FORMAT')
|
datetime=date_format(op.valid_from.astimezone(clist.event.timezone), 'SHORT_DATETIME_FORMAT')
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -754,11 +754,11 @@ def perform_checkin(op: OrderPosition, clist: CheckinList, given_answers: dict,
|
|||||||
else:
|
else:
|
||||||
raise CheckInError(
|
raise CheckInError(
|
||||||
_('This ticket was only valid before {datetime}.').format(
|
_('This ticket was only valid before {datetime}.').format(
|
||||||
datetime=date_format(op.valid_until, 'SHORT_DATETIME_FORMAT')
|
datetime=date_format(op.valid_until.astimezone(clist.event.timezone), 'SHORT_DATETIME_FORMAT')
|
||||||
),
|
),
|
||||||
'invalid_time',
|
'invalid_time',
|
||||||
_('This ticket was only valid before {datetime}.').format(
|
_('This ticket was only valid before {datetime}.').format(
|
||||||
datetime=date_format(op.valid_until, 'SHORT_DATETIME_FORMAT')
|
datetime=date_format(op.valid_until.astimezone(clist.event.timezone), 'SHORT_DATETIME_FORMAT')
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user