AceTime  3.0.0
Date and time classes for Arduino that support timezones from the TZ Database.
zone_policies.cpp
1 // This file was generated by the following script:
2 //
3 // $ /home/brian/src/AceTimeSuite/compiler/src/acetimecompiler/tzcompiler.py
4 // --input_dir /home/brian/src/AceTimeSuite/libraries/AceTimeLib/src/testingzonedb/tzfiles
5 // --output_dir /home/brian/src/AceTimeSuite/libraries/AceTimeLib/src/testingzonedb
6 // --tz_version 2025b
7 // --action zonedb
8 // --language arduino
9 // --scope basic
10 // --db_namespace testingzonedb
11 // --zi_namespace basic::Info
12 // --include_list include_list.txt
13 // --nocompress
14 // --start_year 1980
15 // --until_year 2200
16 //
17 // using the TZ Database files
18 //
19 // africa
20 // antarctica
21 // asia
22 // australasia
23 // backward
24 // etcetera
25 // europe
26 // northamerica
27 // southamerica
28 //
29 // from https://github.com/eggert/tz/releases/tag/2025b
30 //
31 // Supported Zones: 12 (11 zones, 1 links)
32 // Unsupported Zones: 585 (329 zones, 256 links)
33 //
34 // Requested Years: [1980,2200]
35 // Accurate Years: [1980,32767]
36 //
37 // Original Years: [1844,2087]
38 // Generated Years: [1945,2007]
39 // Lower/Upper Truncated: [True,False]
40 //
41 // Estimator Years: [1945,2009]
42 // Max Buffer Size: 6
43 //
44 // Records:
45 // Infos: 12
46 // Eras: 15
47 // Policies: 8
48 // Rules: 32
49 //
50 // Memory (8-bits):
51 // Context: 16
52 // Rules: 288
53 // Policies: 24
54 // Eras: 165
55 // Zones: 143
56 // Links: 13
57 // Registry: 24
58 // Formats: 27
59 // Letters: 11
60 // Fragments: 0
61 // Names: 202 (original: 202)
62 // TOTAL: 913
63 //
64 // Memory (32-bits):
65 // Context: 24
66 // Rules: 384
67 // Policies: 64
68 // Eras: 240
69 // Zones: 264
70 // Links: 24
71 // Registry: 48
72 // Formats: 27
73 // Letters: 17
74 // Fragments: 0
75 // Names: 202 (original: 202)
76 // TOTAL: 1294
77 //
78 // DO NOT EDIT
79 
80 #include <zoneinfo/compat.h>
81 #include "zone_policies.h"
82 
83 namespace ace_time {
84 namespace testingzonedb {
85 
86 //---------------------------------------------------------------------------
87 // Policies: 8
88 // Rules: 32
89 //---------------------------------------------------------------------------
90 
91 //---------------------------------------------------------------------------
92 // Policy name: Aus
93 // Rules: 1
94 //---------------------------------------------------------------------------
95 
96 static const basic::Info::ZoneRule kZoneRulesAus[] ACE_TIME_PROGMEM = {
97  // Anchor: Rule Aus 1943 1944 - Mar lastSun 2:00s 0 S
98  {
99  -127 /*fromYearTiny (-32767)*/,
100  -127 /*toYearTiny (-32767)*/,
101  1 /*inMonth*/,
102  0 /*onDayOfWeek*/,
103  1 /*onDayOfMonth*/,
104  0 /*atTimeCode*/,
105  0 /*atTimeModifier (kSuffixW + minute=0)*/,
106  4 /*deltaCode ((deltaMinutes=0)/15 + 4)*/,
107  2 /*letterIndex ("S")*/,
108  },
109 
110 };
111 
112 const basic::Info::ZonePolicy kZonePolicyAus ACE_TIME_PROGMEM = {
113  kZoneRulesAus /*rules*/,
114  1 /*numRules*/,
115 };
116 
117 //---------------------------------------------------------------------------
118 // Policy name: Canada
119 // Rules: 7
120 //---------------------------------------------------------------------------
121 
122 static const basic::Info::ZoneRule kZoneRulesCanada[] ACE_TIME_PROGMEM = {
123  // Anchor: Rule Canada 1945 only - Sep 30 2:00 0 S
124  {
125  -127 /*fromYearTiny (-32767)*/,
126  -127 /*toYearTiny (-32767)*/,
127  1 /*inMonth*/,
128  0 /*onDayOfWeek*/,
129  1 /*onDayOfMonth*/,
130  0 /*atTimeCode*/,
131  0 /*atTimeModifier (kSuffixW + minute=0)*/,
132  4 /*deltaCode ((deltaMinutes=0)/15 + 4)*/,
133  2 /*letterIndex ("S")*/,
134  },
135  // Rule Canada 1945 only - Sep 30 2:00 0 S
136  {
137  -127 /*fromYearTiny (1945)*/,
138  -127 /*toYearTiny (1945)*/,
139  9 /*inMonth*/,
140  0 /*onDayOfWeek*/,
141  30 /*onDayOfMonth*/,
142  8 /*atTimeCode*/,
143  0 /*atTimeModifier (kSuffixW + minute=0)*/,
144  4 /*deltaCode ((deltaMinutes=0)/15 + 4)*/,
145  2 /*letterIndex ("S")*/,
146  },
147  // Rule Canada 1974 1986 - Apr lastSun 2:00 1:00 D
148  {
149  -126 /*fromYearTiny (1974)*/,
150  -114 /*toYearTiny (1986)*/,
151  4 /*inMonth*/,
152  7 /*onDayOfWeek*/,
153  0 /*onDayOfMonth*/,
154  8 /*atTimeCode*/,
155  0 /*atTimeModifier (kSuffixW + minute=0)*/,
156  8 /*deltaCode ((deltaMinutes=60)/15 + 4)*/,
157  1 /*letterIndex ("D")*/,
158  },
159  // Rule Canada 1974 2006 - Oct lastSun 2:00 0 S
160  {
161  -126 /*fromYearTiny (1974)*/,
162  -94 /*toYearTiny (2006)*/,
163  10 /*inMonth*/,
164  7 /*onDayOfWeek*/,
165  0 /*onDayOfMonth*/,
166  8 /*atTimeCode*/,
167  0 /*atTimeModifier (kSuffixW + minute=0)*/,
168  4 /*deltaCode ((deltaMinutes=0)/15 + 4)*/,
169  2 /*letterIndex ("S")*/,
170  },
171  // Rule Canada 1987 2006 - Apr Sun>=1 2:00 1:00 D
172  {
173  -113 /*fromYearTiny (1987)*/,
174  -94 /*toYearTiny (2006)*/,
175  4 /*inMonth*/,
176  7 /*onDayOfWeek*/,
177  1 /*onDayOfMonth*/,
178  8 /*atTimeCode*/,
179  0 /*atTimeModifier (kSuffixW + minute=0)*/,
180  8 /*deltaCode ((deltaMinutes=60)/15 + 4)*/,
181  1 /*letterIndex ("D")*/,
182  },
183  // Rule Canada 2007 max - Mar Sun>=8 2:00 1:00 D
184  {
185  -93 /*fromYearTiny (2007)*/,
186  126 /*toYearTiny (32766)*/,
187  3 /*inMonth*/,
188  7 /*onDayOfWeek*/,
189  8 /*onDayOfMonth*/,
190  8 /*atTimeCode*/,
191  0 /*atTimeModifier (kSuffixW + minute=0)*/,
192  8 /*deltaCode ((deltaMinutes=60)/15 + 4)*/,
193  1 /*letterIndex ("D")*/,
194  },
195  // Rule Canada 2007 max - Nov Sun>=1 2:00 0 S
196  {
197  -93 /*fromYearTiny (2007)*/,
198  126 /*toYearTiny (32766)*/,
199  11 /*inMonth*/,
200  7 /*onDayOfWeek*/,
201  1 /*onDayOfMonth*/,
202  8 /*atTimeCode*/,
203  0 /*atTimeModifier (kSuffixW + minute=0)*/,
204  4 /*deltaCode ((deltaMinutes=0)/15 + 4)*/,
205  2 /*letterIndex ("S")*/,
206  },
207 
208 };
209 
210 const basic::Info::ZonePolicy kZonePolicyCanada ACE_TIME_PROGMEM = {
211  kZoneRulesCanada /*rules*/,
212  7 /*numRules*/,
213 };
214 
215 //---------------------------------------------------------------------------
216 // Policy name: Ecuador
217 // Rules: 3
218 //---------------------------------------------------------------------------
219 
220 static const basic::Info::ZoneRule kZoneRulesEcuador[] ACE_TIME_PROGMEM = {
221  // Anchor: Rule Ecuador 1993 only - Feb 5 0:00 0 -
222  {
223  -127 /*fromYearTiny (-32767)*/,
224  -127 /*toYearTiny (-32767)*/,
225  1 /*inMonth*/,
226  0 /*onDayOfWeek*/,
227  1 /*onDayOfMonth*/,
228  0 /*atTimeCode*/,
229  0 /*atTimeModifier (kSuffixW + minute=0)*/,
230  4 /*deltaCode ((deltaMinutes=0)/15 + 4)*/,
231  0 /*letterIndex ("")*/,
232  },
233  // Rule Ecuador 1992 only - Nov 28 0:00 1:00 -
234  {
235  -108 /*fromYearTiny (1992)*/,
236  -108 /*toYearTiny (1992)*/,
237  11 /*inMonth*/,
238  0 /*onDayOfWeek*/,
239  28 /*onDayOfMonth*/,
240  0 /*atTimeCode*/,
241  0 /*atTimeModifier (kSuffixW + minute=0)*/,
242  8 /*deltaCode ((deltaMinutes=60)/15 + 4)*/,
243  0 /*letterIndex ("")*/,
244  },
245  // Rule Ecuador 1993 only - Feb 5 0:00 0 -
246  {
247  -107 /*fromYearTiny (1993)*/,
248  -107 /*toYearTiny (1993)*/,
249  2 /*inMonth*/,
250  0 /*onDayOfWeek*/,
251  5 /*onDayOfMonth*/,
252  0 /*atTimeCode*/,
253  0 /*atTimeModifier (kSuffixW + minute=0)*/,
254  4 /*deltaCode ((deltaMinutes=0)/15 + 4)*/,
255  0 /*letterIndex ("")*/,
256  },
257 
258 };
259 
260 const basic::Info::ZonePolicy kZonePolicyEcuador ACE_TIME_PROGMEM = {
261  kZoneRulesEcuador /*rules*/,
262  3 /*numRules*/,
263 };
264 
265 //---------------------------------------------------------------------------
266 // Policy name: Edm
267 // Rules: 4
268 //---------------------------------------------------------------------------
269 
270 static const basic::Info::ZoneRule kZoneRulesEdm[] ACE_TIME_PROGMEM = {
271  // Anchor: Rule Edm 1947 only - Sep lastSun 2:00 0 S
272  {
273  -127 /*fromYearTiny (-32767)*/,
274  -127 /*toYearTiny (-32767)*/,
275  1 /*inMonth*/,
276  0 /*onDayOfWeek*/,
277  1 /*onDayOfMonth*/,
278  0 /*atTimeCode*/,
279  0 /*atTimeModifier (kSuffixW + minute=0)*/,
280  4 /*deltaCode ((deltaMinutes=0)/15 + 4)*/,
281  2 /*letterIndex ("S")*/,
282  },
283  // Rule Edm 1947 only - Sep lastSun 2:00 0 S
284  {
285  -127 /*fromYearTiny (1947)*/,
286  -127 /*toYearTiny (1947)*/,
287  9 /*inMonth*/,
288  7 /*onDayOfWeek*/,
289  0 /*onDayOfMonth*/,
290  8 /*atTimeCode*/,
291  0 /*atTimeModifier (kSuffixW + minute=0)*/,
292  4 /*deltaCode ((deltaMinutes=0)/15 + 4)*/,
293  2 /*letterIndex ("S")*/,
294  },
295  // Rule Edm 1972 1986 - Apr lastSun 2:00 1:00 D
296  {
297  -127 /*fromYearTiny (1972)*/,
298  -114 /*toYearTiny (1986)*/,
299  4 /*inMonth*/,
300  7 /*onDayOfWeek*/,
301  0 /*onDayOfMonth*/,
302  8 /*atTimeCode*/,
303  0 /*atTimeModifier (kSuffixW + minute=0)*/,
304  8 /*deltaCode ((deltaMinutes=60)/15 + 4)*/,
305  1 /*letterIndex ("D")*/,
306  },
307  // Rule Edm 1972 2006 - Oct lastSun 2:00 0 S
308  {
309  -127 /*fromYearTiny (1972)*/,
310  -94 /*toYearTiny (2006)*/,
311  10 /*inMonth*/,
312  7 /*onDayOfWeek*/,
313  0 /*onDayOfMonth*/,
314  8 /*atTimeCode*/,
315  0 /*atTimeModifier (kSuffixW + minute=0)*/,
316  4 /*deltaCode ((deltaMinutes=0)/15 + 4)*/,
317  2 /*letterIndex ("S")*/,
318  },
319 
320 };
321 
322 const basic::Info::ZonePolicy kZonePolicyEdm ACE_TIME_PROGMEM = {
323  kZoneRulesEdm /*rules*/,
324  4 /*numRules*/,
325 };
326 
327 //---------------------------------------------------------------------------
328 // Policy name: SA
329 // Rules: 1
330 //---------------------------------------------------------------------------
331 
332 static const basic::Info::ZoneRule kZoneRulesSA[] ACE_TIME_PROGMEM = {
333  // Anchor: Rule SA 1943 1944 - Mar Sun>=15 2:00 0 -
334  {
335  -127 /*fromYearTiny (-32767)*/,
336  -127 /*toYearTiny (-32767)*/,
337  1 /*inMonth*/,
338  0 /*onDayOfWeek*/,
339  1 /*onDayOfMonth*/,
340  0 /*atTimeCode*/,
341  0 /*atTimeModifier (kSuffixW + minute=0)*/,
342  4 /*deltaCode ((deltaMinutes=0)/15 + 4)*/,
343  0 /*letterIndex ("")*/,
344  },
345 
346 };
347 
348 const basic::Info::ZonePolicy kZonePolicySA ACE_TIME_PROGMEM = {
349  kZoneRulesSA /*rules*/,
350  1 /*numRules*/,
351 };
352 
353 //---------------------------------------------------------------------------
354 // Policy name: US
355 // Rules: 7
356 //---------------------------------------------------------------------------
357 
358 static const basic::Info::ZoneRule kZoneRulesUS[] ACE_TIME_PROGMEM = {
359  // Anchor: Rule US 1967 2006 - Oct lastSun 2:00 0 S
360  {
361  -127 /*fromYearTiny (-32767)*/,
362  -127 /*toYearTiny (-32767)*/,
363  1 /*inMonth*/,
364  0 /*onDayOfWeek*/,
365  1 /*onDayOfMonth*/,
366  0 /*atTimeCode*/,
367  0 /*atTimeModifier (kSuffixW + minute=0)*/,
368  4 /*deltaCode ((deltaMinutes=0)/15 + 4)*/,
369  2 /*letterIndex ("S")*/,
370  },
371  // Rule US 1967 2006 - Oct lastSun 2:00 0 S
372  {
373  -127 /*fromYearTiny (1967)*/,
374  -94 /*toYearTiny (2006)*/,
375  10 /*inMonth*/,
376  7 /*onDayOfWeek*/,
377  0 /*onDayOfMonth*/,
378  8 /*atTimeCode*/,
379  0 /*atTimeModifier (kSuffixW + minute=0)*/,
380  4 /*deltaCode ((deltaMinutes=0)/15 + 4)*/,
381  2 /*letterIndex ("S")*/,
382  },
383  // Rule US 1975 only - Feb lastSun 2:00 1:00 D
384  {
385  -125 /*fromYearTiny (1975)*/,
386  -125 /*toYearTiny (1975)*/,
387  2 /*inMonth*/,
388  7 /*onDayOfWeek*/,
389  0 /*onDayOfMonth*/,
390  8 /*atTimeCode*/,
391  0 /*atTimeModifier (kSuffixW + minute=0)*/,
392  8 /*deltaCode ((deltaMinutes=60)/15 + 4)*/,
393  1 /*letterIndex ("D")*/,
394  },
395  // Rule US 1976 1986 - Apr lastSun 2:00 1:00 D
396  {
397  -124 /*fromYearTiny (1976)*/,
398  -114 /*toYearTiny (1986)*/,
399  4 /*inMonth*/,
400  7 /*onDayOfWeek*/,
401  0 /*onDayOfMonth*/,
402  8 /*atTimeCode*/,
403  0 /*atTimeModifier (kSuffixW + minute=0)*/,
404  8 /*deltaCode ((deltaMinutes=60)/15 + 4)*/,
405  1 /*letterIndex ("D")*/,
406  },
407  // Rule US 1987 2006 - Apr Sun>=1 2:00 1:00 D
408  {
409  -113 /*fromYearTiny (1987)*/,
410  -94 /*toYearTiny (2006)*/,
411  4 /*inMonth*/,
412  7 /*onDayOfWeek*/,
413  1 /*onDayOfMonth*/,
414  8 /*atTimeCode*/,
415  0 /*atTimeModifier (kSuffixW + minute=0)*/,
416  8 /*deltaCode ((deltaMinutes=60)/15 + 4)*/,
417  1 /*letterIndex ("D")*/,
418  },
419  // Rule US 2007 max - Mar Sun>=8 2:00 1:00 D
420  {
421  -93 /*fromYearTiny (2007)*/,
422  126 /*toYearTiny (32766)*/,
423  3 /*inMonth*/,
424  7 /*onDayOfWeek*/,
425  8 /*onDayOfMonth*/,
426  8 /*atTimeCode*/,
427  0 /*atTimeModifier (kSuffixW + minute=0)*/,
428  8 /*deltaCode ((deltaMinutes=60)/15 + 4)*/,
429  1 /*letterIndex ("D")*/,
430  },
431  // Rule US 2007 max - Nov Sun>=1 2:00 0 S
432  {
433  -93 /*fromYearTiny (2007)*/,
434  126 /*toYearTiny (32766)*/,
435  11 /*inMonth*/,
436  7 /*onDayOfWeek*/,
437  1 /*onDayOfMonth*/,
438  8 /*atTimeCode*/,
439  0 /*atTimeModifier (kSuffixW + minute=0)*/,
440  4 /*deltaCode ((deltaMinutes=0)/15 + 4)*/,
441  2 /*letterIndex ("S")*/,
442  },
443 
444 };
445 
446 const basic::Info::ZonePolicy kZonePolicyUS ACE_TIME_PROGMEM = {
447  kZoneRulesUS /*rules*/,
448  7 /*numRules*/,
449 };
450 
451 //---------------------------------------------------------------------------
452 // Policy name: Vanc
453 // Rules: 4
454 //---------------------------------------------------------------------------
455 
456 static const basic::Info::ZoneRule kZoneRulesVanc[] ACE_TIME_PROGMEM = {
457  // Anchor: Rule Vanc 1947 1961 - Sep lastSun 2:00 0 S
458  {
459  -127 /*fromYearTiny (-32767)*/,
460  -127 /*toYearTiny (-32767)*/,
461  1 /*inMonth*/,
462  0 /*onDayOfWeek*/,
463  1 /*onDayOfMonth*/,
464  0 /*atTimeCode*/,
465  0 /*atTimeModifier (kSuffixW + minute=0)*/,
466  4 /*deltaCode ((deltaMinutes=0)/15 + 4)*/,
467  2 /*letterIndex ("S")*/,
468  },
469  // Rule Vanc 1946 1986 - Apr lastSun 2:00 1:00 D
470  {
471  -127 /*fromYearTiny (1946)*/,
472  -114 /*toYearTiny (1986)*/,
473  4 /*inMonth*/,
474  7 /*onDayOfWeek*/,
475  0 /*onDayOfMonth*/,
476  8 /*atTimeCode*/,
477  0 /*atTimeModifier (kSuffixW + minute=0)*/,
478  8 /*deltaCode ((deltaMinutes=60)/15 + 4)*/,
479  1 /*letterIndex ("D")*/,
480  },
481  // Rule Vanc 1947 1961 - Sep lastSun 2:00 0 S
482  {
483  -127 /*fromYearTiny (1947)*/,
484  -127 /*toYearTiny (1961)*/,
485  9 /*inMonth*/,
486  7 /*onDayOfWeek*/,
487  0 /*onDayOfMonth*/,
488  8 /*atTimeCode*/,
489  0 /*atTimeModifier (kSuffixW + minute=0)*/,
490  4 /*deltaCode ((deltaMinutes=0)/15 + 4)*/,
491  2 /*letterIndex ("S")*/,
492  },
493  // Rule Vanc 1962 2006 - Oct lastSun 2:00 0 S
494  {
495  -127 /*fromYearTiny (1962)*/,
496  -94 /*toYearTiny (2006)*/,
497  10 /*inMonth*/,
498  7 /*onDayOfWeek*/,
499  0 /*onDayOfMonth*/,
500  8 /*atTimeCode*/,
501  0 /*atTimeModifier (kSuffixW + minute=0)*/,
502  4 /*deltaCode ((deltaMinutes=0)/15 + 4)*/,
503  2 /*letterIndex ("S")*/,
504  },
505 
506 };
507 
508 const basic::Info::ZonePolicy kZonePolicyVanc ACE_TIME_PROGMEM = {
509  kZoneRulesVanc /*rules*/,
510  4 /*numRules*/,
511 };
512 
513 //---------------------------------------------------------------------------
514 // Policy name: Winn
515 // Rules: 5
516 //---------------------------------------------------------------------------
517 
518 static const basic::Info::ZoneRule kZoneRulesWinn[] ACE_TIME_PROGMEM = {
519  // Anchor: Rule Winn 1963 only - Sep 22 2:00 0 S
520  {
521  -127 /*fromYearTiny (-32767)*/,
522  -127 /*toYearTiny (-32767)*/,
523  1 /*inMonth*/,
524  0 /*onDayOfWeek*/,
525  1 /*onDayOfMonth*/,
526  0 /*atTimeCode*/,
527  0 /*atTimeModifier (kSuffixW + minute=0)*/,
528  4 /*deltaCode ((deltaMinutes=0)/15 + 4)*/,
529  2 /*letterIndex ("S")*/,
530  },
531  // Rule Winn 1963 only - Sep 22 2:00 0 S
532  {
533  -127 /*fromYearTiny (1963)*/,
534  -127 /*toYearTiny (1963)*/,
535  9 /*inMonth*/,
536  0 /*onDayOfWeek*/,
537  22 /*onDayOfMonth*/,
538  8 /*atTimeCode*/,
539  0 /*atTimeModifier (kSuffixW + minute=0)*/,
540  4 /*deltaCode ((deltaMinutes=0)/15 + 4)*/,
541  2 /*letterIndex ("S")*/,
542  },
543  // Rule Winn 1966 1986 - Apr lastSun 2:00s 1:00 D
544  {
545  -127 /*fromYearTiny (1966)*/,
546  -114 /*toYearTiny (1986)*/,
547  4 /*inMonth*/,
548  7 /*onDayOfWeek*/,
549  0 /*onDayOfMonth*/,
550  8 /*atTimeCode*/,
551  16 /*atTimeModifier (kSuffixS + minute=0)*/,
552  8 /*deltaCode ((deltaMinutes=60)/15 + 4)*/,
553  1 /*letterIndex ("D")*/,
554  },
555  // Rule Winn 1966 2005 - Oct lastSun 2:00s 0 S
556  {
557  -127 /*fromYearTiny (1966)*/,
558  -95 /*toYearTiny (2005)*/,
559  10 /*inMonth*/,
560  7 /*onDayOfWeek*/,
561  0 /*onDayOfMonth*/,
562  8 /*atTimeCode*/,
563  16 /*atTimeModifier (kSuffixS + minute=0)*/,
564  4 /*deltaCode ((deltaMinutes=0)/15 + 4)*/,
565  2 /*letterIndex ("S")*/,
566  },
567  // Rule Winn 1987 2005 - Apr Sun>=1 2:00s 1:00 D
568  {
569  -113 /*fromYearTiny (1987)*/,
570  -95 /*toYearTiny (2005)*/,
571  4 /*inMonth*/,
572  7 /*onDayOfWeek*/,
573  1 /*onDayOfMonth*/,
574  8 /*atTimeCode*/,
575  16 /*atTimeModifier (kSuffixS + minute=0)*/,
576  8 /*deltaCode ((deltaMinutes=60)/15 + 4)*/,
577  1 /*letterIndex ("D")*/,
578  },
579 
580 };
581 
582 const basic::Info::ZonePolicy kZonePolicyWinn ACE_TIME_PROGMEM = {
583  kZoneRulesWinn /*rules*/,
584  5 /*numRules*/,
585 };
586 
587 
588 
589 }
590 }
Macros and definitions that provide a consistency layer among the various Arduino boards for compatib...