Expand description
DST timezone helpers for German MESZ/MEZ validation.
EU DST rule: MESZ (summer time) starts the last Sunday of March at 01:00 UTC, and ends the last Sunday of October at 01:00 UTC.
Functions§
- dst_
transitions_ between - Net DST delta across two UTC instants (expressed in epoch minutes).
- dtm_
after - Whether a DTM value (format 303 or 102) lies after a format-303 reference, such as the document date in DTM+137. A 102 day lies after it when it begins after it — a later German calendar day.
- dtm_
not_ after - Whether a DTM value lies no later than a format-303 reference, such as
the document date in DTM+137 (
[495]“Der Zeitpunkt muss ≤ dem Wert im DE2380 des DTM+137 sein”). A 102 day qualifies when it begins no later — the reference’s German day or one before ([515]); a 304 instant compares to the second. Comparing the strings put20241115230000+00(304) after202411152300+00, since0sorts after+. - dtm_
start_ utc_ min - UTC epoch minutes at which a DTM value begins: the instant itself for
format 303 (
CCYYMMDDHHMM, UTC), the German midnight that starts the day for format 102 (CCYYMMDD, a calendar day in German time). - is_
mesz_ utc - Returns
Trueif the given CCYYMMDDHHMM value falls within German summer time (MESZ),Falseif it falls in winter time (MEZ), orUnknownif the input is invalid/too short. - is_
mez_ utc - Returns
Trueif the given CCYYMMDDHHMM value falls within German winter time (MEZ). - parse_
dtm303 - Parse EDIFACT DTM format 303 (
CCYYMMDDHHMM, already UTC per BDEW convention) into UTC epoch minutes. Any timezone suffix (e.g.+00,UTC) is ignored — BDEW values are always UTC.