mirror of
https://github.com/skoelle/calender_sync.git
synced 2026-09-17 18:20:24 +00:00
fix: display local timezone in API and web frontend instead of GMT
- Add TIMEZONE environment variable support (default: UTC) - Convert naive UTC datetimes from database to local timezone in API responses - Add timezone field to EventResponse and EventsListResponse Pydantic models - Update web template to display timezone information - Update PLAN.md to document timezone changes This fixes the issue where events at 8:00 UTC would appear as 6:00 GMT by displaying times in the correct local timezone.
This commit is contained in:
@@ -116,7 +116,7 @@
|
||||
}
|
||||
|
||||
.event-location::before {
|
||||
content: "\1F4CD ";
|
||||
content: "\\1F4CD ";
|
||||
}
|
||||
|
||||
.badge {
|
||||
@@ -181,11 +181,11 @@
|
||||
<div>
|
||||
<div class="event-date">
|
||||
{% if event.all_day %}
|
||||
{{ event.start_at.strftime('%d.%m.%Y') }} <span class="all-day">Ganztägig</span>
|
||||
{{ event.start_at.split('T')[0] }} <span class="all-day">Ganztägig</span>
|
||||
{% elif event.end_at %}
|
||||
{{ event.start_at.strftime('%d.%m.%Y %H:%M') }} - {{ event.end_at.strftime('%H:%M') }}
|
||||
{{ event.start_at.split('T')[0] }} {{ event.start_at.split('T')[1][:5] }} - {{ event.end_at.split('T')[1][:5] }} {{ event.timezone }}
|
||||
{% else %}
|
||||
{{ event.start_at.strftime('%d.%m.%Y %H:%M') }}
|
||||
{{ event.start_at.split('T')[0] }} {{ event.start_at.split('T')[1][:5] }} {{ event.timezone }}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="event-summary">{{ event.summary or '(Kein Titel)' }}</div>
|
||||
|
||||
Reference in New Issue
Block a user