<p>If I'm understanding correctly, the three dates should all appear as the same time on the frontend, as if there was no regional time change?</p>
<p>You can do this by using Calendars <code>.format()</code> method on startDate, like <code>event.startDate.format('F jS')</code> or continue using the <code>|date</code> filter with the <code>event.startDateLocalized</code> property like <code>event.startDateLocalized|date('F jS g:ia', timezone='America/Detroit')</code></p>

CC BY-SA 4.0
2024-02-23T23:11:34.400Z
+1 for the reference to `startDateLocalized`, which isn't documented on the main [Event object reference](https://docs.solspace.com/craft/calendar/v4/templates/objects/event/), but nicely resolves [Solspace Calendar ignoring Craft CMS's Time Zone configuration](https://docs.solspace.com/craft/calendar/v4/setup/faq/#how-does-calendar-handle-timezones). That mitigates a lot of issues and helps avoid confusion when using Craft's [`|date`](https://craftcms.com/docs/4.x/dev/filters.html#date) or [`|datetime`](https://craftcms.com/docs/4.x/dev/filters.html#datetime) filters.
Jeremy Caney
CC BY-SA 4.0
2022-10-14T14:42:43.937Z
2022-10-14T14:42:43.937Z
andrewmenich
<p>How are you handling Daylight Savings Time with Solspace Calendar event elements?</p>
<p>In our part of the world (America/Detroit), we seasonally offset our clocks by one hour, twice a year.</p>
<p>Let's say we have three events with identical starting times. Two of those events take place after November 3 -- when the time changes.</p>
<p>In the database, these three start dates appear like so:</p>
<pre><code>2022-10-18 18:30:00
2022-11-15 18:30:00
2022-12-06 18:30:00
</code></pre>
<p>We parse those out on the front end and the two dates after November 3 display a start time that is offset by one hour.</p>
<pre><code>{% set startDate = event.startDate %}
{{ startDate|date('F jS', timezone='America/Detroit') }}
</code></pre>
<p>How is this happening? How might we compensate?</p>
<pre><code>Craft CMS 3.7.56
Solspace Calendar Pro 3.3.16
PHP 7.4.30
MySQL 5.5.5 - 10.83-MariaDB```
</code></pre>

<datetime><solspace><plugin-solspacecalendar>
Daylight Savings How?
# Daylight Savings How?

(Asked by: username_0 on 2022-10-13)

How are you handling Daylight Savings Time with Solspace Calendar event elements?
In our part of the world (America/Detroit), we seasonally offset our clocks by one hour, twice a year.
Let's say we have three events with identical starting times. Two of those events take place after November 3 -- when the time changes.
In the database, these three start dates appear like so:
2022-10-18 18:30:00
2022-11-15 18:30:00
2022-12-06 18:30:00

We parse those out on the front end and the two dates after November 3 display a start time that is offset by one hour.
{% set startDate = event.startDate %}
{{ startDate|date('F jS', timezone='America/Detroit') }}

How is this happening? How might we compensate?
Craft CMS 3.7.56
Solspace Calendar Pro 3.3.16
PHP 7.4.30
MySQL 5.5.5 - 10.83-MariaDB```

**Tags:** datetime, solspace, plugin-solspacecalendar


---

## 1 answers

### Answer by username_1 on 2022-10-14. Score: 4 | Accepted answer

If I'm understanding correctly, the three dates should all appear as the same time on the frontend, as if there was no regional time change?

You can do this by using Calendars `.format()` method on startDate, like `event.startDate.format('F jS')` or continue using the `|date` filter with the `event.startDateLocalized` property like `event.startDateLocalized|date('F jS g:ia', timezone='America/Detroit')`

> **Comments:**
> **username_2**: +1 for the reference to `startDateLocalized`, which isn't documented on the main [Event object reference](https://docs.solspace.com/craft/calendar/v4/templates/objects/event/), but nicely resolves [Solspace Calendar ignoring Craft CMS's Time Zone configuration](https://docs.solspace.com/craft/calendar/v4/setup/faq/#how-does-calendar-handle-timezones). That mitigates a lot of issues and helps avoid confusion when using Craft's [`|date`](https://craftcms.com/docs/4.x/dev/filters.html#date) or [`|datetime`](https://craftcms.com/docs/4.x/dev/filters.html#datetime) filters.  

---

