#32: show dates in europe berlin timezone
All checks were successful
/ ls (pull_request) Successful in 32s
/ ls (push) Successful in 31s
/ ls (release) Successful in 26s

This commit is contained in:
Jonas 2024-07-08 17:58:32 +02:00
parent 219561c5ae
commit 7e53705b4b
Signed by: lubiana
SSH key fingerprint: SHA256:gkqM8DUX4Blf6P52fycW8ISTd+4eAHH+Uzu9iyc8hAM
3 changed files with 5 additions and 4 deletions

View file

@ -23,6 +23,7 @@ final class FoodOrderType extends AbstractType
])
->add(child: 'closedAt', options: [
'label' => 'closes at',
'view_timezone' => 'Europe/Berlin',
])
->add(child: 'createdBy')
;

View file

@ -17,11 +17,11 @@
</tr>
<tr>
<th>CreatedAt</th>
<td>{{ food_order.createdAt ? food_order.createdAt|date('Y-m-d H:i:s') : '' }}</td>
<td>{{ food_order.createdAt ? food_order.createdAt|date('Y-m-d H:i:s', 'Europe/Berlin') : '' }}</td>
</tr>
<tr>
<th>ClosedAt</th>
<td>{{ food_order.closedAt ? food_order.closedAt|date('Y-m-d H:i:s') : '' }}</td>
<td>{{ food_order.closedAt ? food_order.closedAt|date('Y-m-d H:i:s', 'Europe/Berlin') : '' }}</td>
</tr>
</tbody>
</table>

View file

@ -1,8 +1,8 @@
<tr>
<td>{{ food_order.createdBy }}</td>
<td>{{ food_order.foodVendor.name }}</td>
<td>{{ food_order.createdAt ? food_order.createdAt|date('Y-m-d H:i:s') : '' }}</td>
<td>{{ food_order.closedAt ? food_order.closedAt|date('Y-m-d H:i:s') : '' }}</td>
<td>{{ food_order.createdAt ? food_order.createdAt|date('Y-m-d H:i:s', 'Europe/Berlin') : '' }}</td>
<td>{{ food_order.closedAt ? food_order.closedAt|date('Y-m-d H:i:s', 'Europe/Berlin') : '' }}</td>
<td>
<a href="{{ path('app_food_order_show', {'id': food_order.id}) }}">show</a>
</td>