Skip to content

iCal: time displayed on TRMNL and time displayed on previews are different when trying to offset times #240

@ymstnt

Description

@ymstnt

I'm trying to use the built in iCal parser to display events from various calendars.

I have two calendars with different timestamp methods. One has the timezone offset set correctly, the other one uses UTC (+0:00), like so:

{
    ...
    "SUMMARY": "Event1",
    "DTSTART": "2026-04-30T11:00:00+02:00",
    "DTEND": "2026-04-30T12:00:00+02:00",
    "SEQUENCE": "0",
    "STATUS": "CONFIRMED"
},

and

{
      ...
      "SUMMARY": "Event2",
      "DTSTART": "2026-04-30T12:25:00+00:00",
      "DTEND": "2026-04-30T14:05:00+00:00",
      "SEQUENCE": "0",
},

The display as expected in the preview and on the TRMNL device itself, the events with +2:00 offsets display correctly and the events with +0:00 display incorrectly:

Image

(For simplicity, the green events are from calendars with correct offsets, the red ones are ones from the calendar with the incorrect offset (UTC, +0:00) and the black boxes are not related)

So naturally, I tried to fix the offset by using event.DTSTART | date: '%s' | plus: trmnl.user.utc_offset | date: '%H:%M' as per TRMNL's official article about liquid and timezones. This is when things started getting weird.

In the preview window, it looks like, this have had the intended effect. Events from both calendars are correctly displayed using the +2:00 offset now:

Image

(Again, the green boxes are from the calendars that were correct even before the change, and the red ones are the ones with the incorrect offset, which are now offset correctly to +2:00)

However, on the TRMNL hardware itself, they are displayed completely differently:

Image

I kinda get that the "correct" calendars get the +2:00 offset and it's displayed incorrectly because of that. However, I don't get that why the "incorrect" calendar suddenly gets a +4:00 offset, even though without the trmnl.user.utc_offset it had no offset at all.

This doesn't seem to only happen when using trmn.user.utc_offset. On a previous calendar plugin attempt, I didn't know of this feature and it still happened. There I simply added + 2 hours to the time.

I'm using LaraPaper 0.34.0, with TRMNL FW1.6.10 on a SeedStudio 7.5" OG TRMNL kit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions