29 lines
659 B
JavaScript
29 lines
659 B
JavaScript
|
|
/*
|
|||
|
|
ZDA Time & Date – UTC, Day, Month, Year and Local Time Zone
|
|||
|
|
1 2 3 4 5 6 7
|
|||
|
|
| | | | | | |
|
|||
|
|
$--ZDA,hhmmss.ss,xx,xx,xxxx,xx,xx*hh
|
|||
|
|
1) Local zone minutes description, same sign as local hours
|
|||
|
|
2) Local zone description, 00 to +/- 13 hours
|
|||
|
|
3) Year
|
|||
|
|
4) Month, 01 to 12
|
|||
|
|
5) Day, 01 to 31
|
|||
|
|
6) Time (UTC)
|
|||
|
|
7) Checksum
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
exports.ID = 'ZDA';
|
|||
|
|
exports.TYPE = 'time-zone';
|
|||
|
|
|
|||
|
|
exports.decode = function(fields) {
|
|||
|
|
return {
|
|||
|
|
sentence: exports.ID,
|
|||
|
|
type: exports.TYPE,
|
|||
|
|
timestamp: fields[1],
|
|||
|
|
day: fields[2],
|
|||
|
|
month: fields[3],
|
|||
|
|
year: fields[4],
|
|||
|
|
ltzh: fields[5],
|
|||
|
|
ltzn: fields[6]
|
|||
|
|
};
|
|||
|
|
}
|