Pass DateTimeZone directly and remove hardcoded ‘europe/brussels’
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3546469. --> Reported by: [joelpittet](https://www.drupal.org/user/160302) Related to !73 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>There are two timezone cleanups needed in the calendar module:</p> <ul> <li>We unnecessarily convert a <code>DateTimeZone</code> object to a string and back before use (e.g., <code>new DateTimeZone(timezone_name_get($dateInfo-&gt;getTimezone()))</code>). This adds noise and can fail if <code>timezone_name_get()</code> returns false.</li> <li>In year view, the minimum date is created with a hardcoded timezone <code>'europe/brussels'</code>, which ignores the site&rsquo;s configured timezone.</li> </ul> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <ul> <li>Pass the existing <code>DateTimeZone</code> object directly everywhere it&rsquo;s needed.</li> <li>Replace the hardcoded timezone with <code>$view-&gt;dateInfo-&gt;getTimezone()</code> so the view respects site configuration.</li> </ul>
issue