Skip to content

DatesFromICal Filter not reflecting Daylight Savings Time #6626

@mrgraphicdes

Description

@mrgraphicdes

Description

The DatesFromiCal lava filter does not appear to pull timestamps with respect to Daylight Savings Time (DST). When set to a DST-observant time zone and utilizing this filter in combination with filters like Date or ToJSON (filters that can display the offset from UTC time zone data), the instance shows schedules set during DST will have datetimes one hour off.
 
There also seems to be other somewhat recent bugs unrelated to this filter but possessing a similar pattern of not recognizing Daylight Savings Time:
 

Actual Behavior

  1. A schedule is pulled via entity command.
  2. The schedule's NextStartDateTime and iCalendarContent values are pulled from the entity.
  3. The filters of DatesFromICal (parameters: 1, 'enddattime') and ToJSON are used on the schedule's iCalendarContent value to get the EndDateTime. NextStartDateTime is pulled as well with a ToJSON filter.
  4. When the schedule is within DST (March 9th - November 3rd), the UTC offset value (value at the end of the timestamp, e.g. "-08:00") between the NextStartDateTime and the EndDateTime will be different. Outside of DST, they will match.

Expected Behavior

The expectation is that the UTC Offset values will match across methods regardless of whether they're within Daylight Savings Time or not.

Steps to Reproduce

  1. Set the time zone to one that observes Daylight Savings Time Under Settings > System > System Configuration > Web.Config Settings. (e.g. (UTC-08:00) Pacific Time (US & Canada))
  2. Create two schedules:
    One for pre-DST (e.g. 3/1/25  for one hour at noon).
    One for during DST (e.g. 4/1/25 for one hour at noon).
  3. Create new page with HTML Content Block or utilize lava tester and input the following lava with your new
    schedule Ids:
{% schedule ids:'[Insert Ids Here]' iterator:'Schedules' securityenabled:'false' %}
    {% for schedule in Schedules %}
        ScheduleId: {{ schedule.Id | ToJSON }}<br>
        NextStartDateTime: {{ schedule.NextStartDateTime | ToJSON }}<br>
        EndDateTime(iCal): {{ schedule.iCalendarContent | DatesFromICal:1,'enddatetime' | First | ToJSON }}
        <br><br>
    {% endfor %}
{% endschedule %}
  1. The results will reflect that the UTC Offset (timezone) is not being adjusted for DST.
Image

Issue Confirmation

  • Perform a search on the Github Issues to see if your bug is already reported.
  • Reproduced the problem on a fresh install or on the demo site.

Rock Version

V17.0

Client Culture Setting

en-US

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fixed in v18.2Status: ConfirmedIt's clear what the subject of the issue is about, and what the resolution should be.Type: BugConfirmed bugs or reports that are very likely to be bugs.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions