Expand description
Local wall-clock times and dates: the string(5) and string(10) fields OCPI uses for
opening hours and tariff restrictions.
These are the only values in OCPI that are not in UTC. Both RegularHours and
TariffRestrictions say the same thing: “in local time, the time zone is defined in the
time_zone field of the Location”. Modelling them as parsed hour/minute and year/month/day
rather than as opaque strings is what lets tariffs evaluate a restriction
like “weekdays 09:00–18:00” against a session that crosses a daylight-saving boundary.
Structs§
- Invalid
Local Date - Why a string is not a
YYYY-MM-DDdate. - Invalid
Local Time - Why a string is not an
HH:MMtime of day. - Local
Date - A local calendar date,
YYYY-MM-DD. - Local
Parts - A wall-clock reading: the date, the time of day, and the day of the week.
- Local
Time - A wall-clock time of day,
HH:MMin 24-hour form with leading zeros.