fix(activities): stamp local tz offset on event datetimes before submit #66
No reviewers
Labels
No labels
app:activities
app:chat
app:events
app:forum
app:libra
app:market
app:restaurant
app:tasks
app:wallet
app:webapp
bug
enhancement
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
aiolabs/webapp!66
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/activities-event-time-tz-offset"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
8:00 — 10:00, the detail page shows10:00 — 12:00. A clean +offset shift in CEST (+02:00)."YYYY-MM-DDTHH:MM"to the LNbits events backend. The backend's_to_unixinevents/nostr_publisher.py:28-33doesdatetime.fromisoformat(value)and, whentzinfo is None, assumes UTC. So08:00entered in CEST is stored as the unix for08:00 UTC, and the NIP-52starttag lands on the relays at the wrong instant. The detail page reads that unix and renders in local time →08:00 UTC = 10:00 CEST.new Date(...), which JS treats as local — so it displayed8:00and the offset bug was invisible there.)withLocalTzOffsethelper inCreateEventDialog.vuestamps the form's wall-clock string with the user's UTC offset ("2026-05-24T08:00"→"2026-05-24T08:00:00+02:00") before the create/update payload goes to the backend. Python'sfromisoformatthen honors the offset and the unix lands correctly. Date-only values pass through unchanged. Seconds (:00) are included for pre-3.11fromisoformatcompatibility.splitDateTimealready trims time to"HH:MM", so the suffix drops cleanly when re-populating the form.Test plan
08:00 — 10:00in your local tz./activities/<id>) — verify it shows08:00 — 10:00, not+offset.08:00/10:00.08:00 — 10:00.🤖 Generated with Claude Code