Ignore:
Timestamp:
06/21/2026 04:48:27 PM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
d6bdbae
Parents:
9effb80
Message:

feat(instellingen): site timezone — all dates + scheduling in chosen zone

Admin → Settings gets a Timezone picker (IANA, validated via Intl; empty =
server/UTC). Applied to: server-side date display (formatDate/formatDateTime
receive timeZone), and post scheduling (datetime-local is now interpreted/shown
in the site's zone instead of browser-local — wall↔UTC via Intl offset).
'Scheduled for' shows the time in the site's zone. NL/EN/DE.

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/admin-settings.ejs

    r9effb80 r421c2d4  
    5252            <option value="<%= l.code %>"<%= defaultLang === l.code ? ' selected' : '' %>><%= l.name %></option>
    5353          <% }); %>
     54        </select>
     55      </label>
     56      <button type="submit" class="btn btn-primary"><%= t('aset.save') %></button>
     57    </form>
     58  </section>
     59
     60  <%# ── Tijdzone ── %>
     61  <section class="set-card" style="margin-top:1rem">
     62    <h2><%= t('aset.timezone') %></h2>
     63    <p class="set-help"><%= t('aset.timezone_hint') %></p>
     64    <form method="post" action="/admin/settings" class="set-form">
     65      <label class="set-field">
     66        <span><%= t('aset.timezone') %></span>
     67        <select name="timezone">
     68          <option value=""<%= !timezone ? ' selected' : '' %>><%= t('aset.timezone_auto') %></option>
     69          <%
     70            var _tz = ['Europe/Amsterdam','Europe/Brussels','Europe/Berlin','Europe/Paris','Europe/London','Europe/Madrid','Europe/Rome','Europe/Lisbon','Europe/Warsaw','Europe/Athens','UTC','America/New_York','America/Chicago','America/Los_Angeles','America/Sao_Paulo','Asia/Tokyo','Asia/Dubai','Australia/Sydney'];
     71            if (timezone && _tz.indexOf(timezone) < 0) _tz.unshift(timezone);
     72          %>
     73          <% _tz.forEach(function(z){ %><option value="<%= z %>"<%= timezone === z ? ' selected' : '' %>><%= z %></option><% }); %>
    5474        </select>
    5575      </label>
Note: See TracChangeset for help on using the changeset viewer.