Peter Cooper
/
diags
test code for our MBED board
DstZones.h@1:6877bb99aa17, 2011-05-04 (annotated)
- Committer:
- lolpcc
- Date:
- Wed May 04 08:30:52 2011 +0000
- Revision:
- 1:6877bb99aa17
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
lolpcc | 1:6877bb99aa17 | 1 | // DstZone.h |
lolpcc | 1:6877bb99aa17 | 2 | // Written by iva2k |
lolpcc | 1:6877bb99aa17 | 3 | // |
lolpcc | 1:6877bb99aa17 | 4 | // Data-driven implementation of DST zones. |
lolpcc | 1:6877bb99aa17 | 5 | // This file is included into many places. |
lolpcc | 1:6877bb99aa17 | 6 | // _() macro is defined for each specific use. |
lolpcc | 1:6877bb99aa17 | 7 | |
lolpcc | 1:6877bb99aa17 | 8 | // zone is DST symbol |
lolpcc | 1:6877bb99aa17 | 9 | // pFnc is NULL or custom function of pFncDstCalc type |
lolpcc | 1:6877bb99aa17 | 10 | // gmt 0..1 |
lolpcc | 1:6877bb99aa17 | 11 | // dst - shift in seconds (typically 3600) |
lolpcc | 1:6877bb99aa17 | 12 | // hr 0..23 |
lolpcc | 1:6877bb99aa17 | 13 | // wk 0=last, 1=first, 2=second, etc. |
lolpcc | 1:6877bb99aa17 | 14 | // wday 0=Sunday |
lolpcc | 1:6877bb99aa17 | 15 | // mon 0..11 |
lolpcc | 1:6877bb99aa17 | 16 | // _( z, fnc, gmt, dst, hr1,wk1,wday1,mon1, hr2,wk2,wday2,mon2 ) |
lolpcc | 1:6877bb99aa17 | 17 | // zone, pFnc, gmt,dst, 1:hr,wk,wday,mon, 2:hr,wk,wday,mon |
lolpcc | 1:6877bb99aa17 | 18 | //------------------------------------------------------------------------------ |
lolpcc | 1:6877bb99aa17 | 19 | _( DST_NONE, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) |
lolpcc | 1:6877bb99aa17 | 20 | // USA: 3600; 2, Second SUN, March; 2, First SUN, November |
lolpcc | 1:6877bb99aa17 | 21 | _( DST_USA, NULL, 0, 3600, 2, 2, 0, 2, 2, 1, 0, 10 ) |
lolpcc | 1:6877bb99aa17 | 22 | // USA: 3600; 2, First SUN, April; 2, Last SUN, October (Pre-2007) |
lolpcc | 1:6877bb99aa17 | 23 | _( DST_USA_06, NULL, 0, 3600, 2, 1, 0, 3, 2, 0, 0, 9 ) |
lolpcc | 1:6877bb99aa17 | 24 | // EU: 3600; 1GMT, Last SUN, March; 1GMT, Last SUN, October |
lolpcc | 1:6877bb99aa17 | 25 | _( DST_EU_GMT, NULL, 1, 3600, 1, 0, 0, 2, 1, 0, 0, 9 ) |
lolpcc | 1:6877bb99aa17 | 26 | // // Just for test |
lolpcc | 1:6877bb99aa17 | 27 | //_( DST_TEST, NULL, 0, 3600, 18, 1, 2, 0, 12, 1, 4, 0 ) |
lolpcc | 1:6877bb99aa17 | 28 | |
lolpcc | 1:6877bb99aa17 | 29 | #undef _ |
lolpcc | 1:6877bb99aa17 | 30 | //END |