├── webapp ├── .gitignore ├── images │ ├── layers.png │ ├── layers-2x.png │ ├── marker-shadow.png │ ├── close.svg │ ├── hamburger.svg │ ├── marker-grey.svg │ ├── region-red.svg │ ├── region-grey.svg │ ├── region-shadow.svg │ ├── info.svg │ ├── marker-red.svg │ └── loading.svg ├── README.md ├── impressum.html ├── hamburger.js ├── index.html ├── about.html ├── style.css ├── leaflet.css ├── mapdisplay.js ├── LICENSE └── moment-timezone-with-data-2012-2022.js ├── README.md └── api-doc ├── README.md └── db-strecken-info ├── LocGeoPos.md ├── HimDetails.md ├── README.md └── HimGeoPos.md /webapp/.gitignore: -------------------------------------------------------------------------------- 1 | .*.* 2 | -------------------------------------------------------------------------------- /webapp/images/layers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nakaner/bahnstoerungen/HEAD/webapp/images/layers.png -------------------------------------------------------------------------------- /webapp/images/layers-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nakaner/bahnstoerungen/HEAD/webapp/images/layers-2x.png -------------------------------------------------------------------------------- /webapp/images/marker-shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nakaner/bahnstoerungen/HEAD/webapp/images/marker-shadow.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This repository contains the attempts to build a web site which displays 2 | disruptions in public transport on a map. The repository consists of two parts: 3 | 4 | * [API documentation](api-doc/README) (reverse engineered) 5 | * [demo application](webapp/README) (the map) 6 | 7 | Go to [https://bahnstoerungen.michreichert.de/](https://bahnstoerungen.michreichert.de/) to see the running demo. 8 | -------------------------------------------------------------------------------- /api-doc/README.md: -------------------------------------------------------------------------------- 1 | This directory contains inofficial (reverse engineered) documentation 2 | of APIs providing partially or fully machine-readable informations about 3 | disruption of public transport services. 4 | 5 | * [strecken.info](db-strecken-info/README.md) by DB Netz covering 6 | the railway network of Deutsche Bahn except S-Bahn Berlin and Hamburg 7 | 8 | The documentation is available under the terms of [Creative Commons 9 | Attribution 2.0](https://creativecommons.org/licenses/by-sa/2.0/) or newer. 10 | -------------------------------------------------------------------------------- /webapp/README.md: -------------------------------------------------------------------------------- 1 | This is a demo how to use the strecken.info API (inofficial!) by DB Netz. 2 | 3 | ## Setup Notes 4 | 5 | Put the HTML and JavaScript files to your web server. Due to the CORS policy 6 | of most modern browsers, you have to do some HTTP header fiddling. There are 7 | two options: 8 | 9 | * You set up a virtual host with Apache which is a reverse proxy and adds 10 | the `Access-Allow-Origin: *` header. You have to enable the modules *proxy*, *proxy_http*, *headers* and *ssl*. 11 | Forwarding to the DB server requires the usage of HTTPS because their server is HTTPS-only (redirects unencrypted HTTP requests to HTTPS). 12 | 13 | ```Apache 14 | Header set Access-Control-Allow-Origin "*" 15 | SSLProxyEngine on 16 | ProxyPass /bin/ https://db-livemaps.hafas.de/bin/ 17 | ProxyPassReverse /bin/ https://db-livemaps.hafas.de/bin/ 18 | ``` 19 | 20 | 21 | ## License 22 | 23 | see [LICENSE](LICENSE) file 24 | -------------------------------------------------------------------------------- /webapp/impressum.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Inoffizielle Störungskarte DB Netz 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | michreichert.de 13 |
14 | 21 |
22 |
23 |

Impressum

24 |

Diese Website wird betrieben von

25 |

Michael Reichert
26 | Traubenstraße 9
27 | 74336 Brackenheim

28 |

E-Mail: impressum-boh6einiwa@michreichert.de

29 |
30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /webapp/hamburger.js: -------------------------------------------------------------------------------- 1 | var menuOpen = false; 2 | var gMenu = document.getElementById('menu'); 3 | var hamburger = document.getElementById('open-menu-icon'); 4 | var closeMenu = function() { 5 | console.log('close'); 6 | //gMenu.classList.add('menuHide'); 7 | gMenu.classList.remove('menuShow'); 8 | hamburger.classList.add('menu-button-closed'); 9 | hamburger.classList.remove('menu-button-open'); 10 | menuOpen = false; 11 | } 12 | 13 | function openCloseMenu(event, onlyClose) { 14 | if (menuOpen) { 15 | closeMenu(event); 16 | } else if (!menuOpen && !onlyClose) { 17 | console.log('open'); 18 | //gMenu.classList.remove('menuHide'); 19 | gMenu.classList.add('menuShow'); 20 | hamburger.classList.add('menu-button-open'); 21 | hamburger.classList.remove('menu-button-closed'); 22 | menuOpen = true; 23 | } 24 | // don't allow the element to propagagte on 25 | event.stopPropagation(); 26 | }; 27 | 28 | hamburger.addEventListener('click', function(event){openCloseMenu(event, false);}); 29 | gMenu.addEventListener('click', function(event){event.stopPropagation();}); 30 | document.body.addEventListener('click', function(event){openCloseMenu(event, true);}); 31 | -------------------------------------------------------------------------------- /webapp/images/close.svg: -------------------------------------------------------------------------------- 1 | 2 | 13 | 15 | 17 | 18 | 20 | image/svg+xml 21 | 23 | 24 | 25 | 26 | 27 | 31 | 35 | 36 | -------------------------------------------------------------------------------- /webapp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Inoffizielle Störungskarte DB Netz 5 | 6 | 7 | 8 | 9 | 14 | 15 | 16 |
17 | 18 |
19 | Inoffizielle Störungskarte DB Netz 20 |
21 | 31 |
32 |
33 |

Die Schnittstelle der DB InfraGO AG, die von dieser inoffiziellen Störungskarte genutzt wurde, wurde Mitte 2024 abgeschaltet und durch eine neue Schnittstelle und Kartenanwendung ersetzt. Die neue offizielle Anwendung der DB InfraGO AG ist unter strecken-info.de zu finden. Anders als die Vorgängeranwendung ist diese auch für Mobilgeräte geeignet, weshalb auf eine Anpassung der inoffiziellen Bahnstörungskarte an die neue Schnittstelle verzichtet wurde.

34 |
35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /webapp/images/hamburger.svg: -------------------------------------------------------------------------------- 1 | 2 | 17 | 37 | 39 | 41 | 42 | 44 | image/svg+xml 45 | 47 | 48 | 49 | 50 | 51 | 57 | 63 | 69 | 70 | -------------------------------------------------------------------------------- /api-doc/db-strecken-info/LocGeoPos.md: -------------------------------------------------------------------------------- 1 | # LocGeoPos 2 | 3 | ## Parameters 4 | 5 | This query returns the operating sites ("Betriebsstellen") located in the current map view. `req` has following value 6 | 7 | ```json 8 | { 9 | "rect": { 10 | "llCrd": { 11 | "x": 13540992.736816406, 12 | "y": 51613752.957501 13 | }, 14 | "urCrd": { 15 | "x": 14005508.422851562, 16 | "y": 51698310.32893037 17 | } 18 | } 19 | } 20 | ``` 21 | 22 | `llCrd` is the lower left corner of the bounding box, `urCrd` is the upper right corner of the bounding box. Coordinates are in WGS84 and follow the coordinate specification explained above. 23 | 24 | `req` hat als Wert ein Objekt, mit einem einzigen Attribut – `rect` mit dem Wert 25 | 26 | ```json 27 | { 28 | "rect": { 29 | "llCrd": { 30 | "x": 13540992.736816406, 31 | "y": 51613752.957501 32 | }, 33 | "urCrd": { 34 | "x": 14005508.422851562, 35 | "y": 51698310.32893037 36 | } 37 | } 38 | } 39 | ``` 40 | 41 | ## Response 42 | 43 | The result is an object. Only the properties whose value is neither an empty object or an empty array nor an empty string are explained here. 44 | 45 | * `version`: 46 | * `lang`: string, currently `deu` 47 | * `ext`: String, a value also used in the query parameters 48 | * `id`: String, a value which seems to be equal to a value of the query parameters 49 | * `svcResL`: array with one element 50 | 51 | ### svcResL 52 | 53 | Each objects of the array `svcResL` has following properties: 54 | 55 | * `err`: string, value `OK`. It is not known if other values are in use. 56 | * `meth`: string, value `LocGeoPos` (name of the queried method) 57 | * `res`: object 58 | 59 | ### res 60 | 61 | The `res` object has following attributes: 62 | 63 | * `common`: object with some properties, seems not to be relevant 64 | * `locL`: array with objects, one per operating site. This property contains the real, interseting payload. 65 | 66 | ### locL 67 | 68 | `locL` objects have following properties: 69 | 70 | * `crd`: object, represents coordinates 71 | ** `type`: string, use coordinate system and geodetic reference, usually `WGS84` 72 | ** `x`: numeric, easting in HAFAS coordinate format 73 | ** `y`: numeric, northing in HAFAS coordinate format 74 | ** `z`: numeric, altitude, usually `0` 75 | * `dist`: numeric, `0` is the only value in use 76 | * `extId`: string, UIC reference (HAFAS number), e.g. 8011542 for Finsterwalde (Niederlausitz). If the operating site is no station or halt served by passenger trains, the number starts with `99`. 77 | * `icoX`: numeric, seems to be always `0` 78 | * `lid`: string, multiple of the attributes of this object encoded as a key value store into a single string, separated by `@`, e.g. `A=1@O=Finsterwalde (Niederlausitz) (BFW)@X=13710411@Y=51636997@u=0@U=80@L=8011542@` 79 | * `name`: string, name and abbreviation (Ril 100 shorting) of the operating site, pattern: `NAME (DS100)` 80 | * `pCls`: integer, not set for blockposts. Stations with passenger service have the value `1930`, other values are `1928` and `512`. 81 | * `type`: string, value usually `S` 82 | * `wt`: integer, `3196` for Luckaitzal, `3272` for Finsterwalde (Niederlausitz) 83 | -------------------------------------------------------------------------------- /webapp/images/marker-grey.svg: -------------------------------------------------------------------------------- 1 | 2 | 17 | 37 | 39 | 40 | 42 | image/svg+xml 43 | 45 | 46 | 47 | 48 | 49 | 51 | 58 | 62 | 66 | 67 | -------------------------------------------------------------------------------- /webapp/images/region-red.svg: -------------------------------------------------------------------------------- 1 | 2 | 17 | 41 | 43 | 44 | 46 | image/svg+xml 47 | 49 | 50 | 51 | 52 | 53 | 55 | 61 | 66 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /webapp/images/region-grey.svg: -------------------------------------------------------------------------------- 1 | 2 | 17 | 41 | 43 | 44 | 46 | image/svg+xml 47 | 49 | 50 | 51 | 52 | 53 | 55 | 61 | 66 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /webapp/images/region-shadow.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 42 | 44 | 45 | 47 | image/svg+xml 48 | 50 | 51 | 52 | 53 | 54 | 56 | 59 | 63 | 67 | 68 | 78 | 86 | 90 | 91 | 92 | 98 | 99 | -------------------------------------------------------------------------------- /webapp/about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Über die inoffizielle Störungskarte DB Netz 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 | Inoffizielle Störungskarte DB Netz 14 |
15 | 25 |
26 |
27 |

Über die inoffizielle Störungskarte

28 |

Die inoffizielle Störungskarte war eine alternative Website, die die Betriebsstörungen im Streckennetz der DB Netz AG anzeigte. Die Karte stellte nur die Störungen dar, die über das Portal strecken.info der DB Netz AG abrufbar waren.

29 |

strecken.info bezog die Störungsdaten von einer API. Diese API wurde auch von dieser inoffiziellen Störungskarte verwendet, welche als Demoanwenung zur inoffiziellen Dokumentation der strecken.info-API gedacht war.

30 |

Die inoffizielle Störungskarte unterscheidet sich in folgenden Punkten von der offiziellen Störungskarte:

31 | 37 | 38 |

Open Source

39 |

Die inoffizielle Störungskarte ist freie Software, jeder kann sie sich auf seinem Webserver installieren. Der Quellcode unterliegt der GNU General Public License Version 3 oder neuer und ist auf Github verfügbar. Die API-Dokumentation ist unter den Bedingungen der Lizenz Creative Commons Namensnennung 2.0 oder neuer verfügbar.

40 | 41 |

Legende

42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |
Störung
behobene Störung
Regionalmeldung (z.B. Ausfall Zugfunk, Trojanerinfektion)
dto., aber vorüber
60 |
61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /webapp/images/info.svg: -------------------------------------------------------------------------------- 1 | 2 | 17 | 37 | 39 | 41 | 42 | 44 | image/svg+xml 45 | 47 | 48 | 49 | 50 | 51 | 57 | 62 | 68 | 69 | -------------------------------------------------------------------------------- /webapp/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: sans-serif; 3 | padding: 0; 4 | margin: 0; 5 | } 6 | html, body { 7 | width: 100%; 8 | height: 100%; 9 | } 10 | header { 11 | /*height: 21px;*/ 12 | /*width: 100%;*/ 13 | background-color: #e8e8e8; 14 | color: black; 15 | font-family: sans-serif; 16 | padding-top: 5px; 17 | padding-bottom: 5px; 18 | padding-left: 10px; 19 | padding-right: 10px; 20 | } 21 | header a { 22 | color: black; 23 | text-decoration: none; 24 | } 25 | #title { 26 | font-size: 16px; 27 | font-weight: bold; 28 | display: inline-block; 29 | } 30 | 31 | .menu-button-closed { 32 | border-radius: 3px; 33 | } 34 | 35 | .menu-button-open { 36 | border-radius: 3px 3px 0 0; 37 | } 38 | 39 | @media screen and (max-width: 600px) { 40 | #title { 41 | display: block; 42 | } 43 | 44 | #open-menu, #open-menu-icon { 45 | /*position: absolute; 46 | display: block;*/ 47 | /*width: 40px; 48 | height: 18px;*/ 49 | /*right: 0px; 50 | top: 0px;*/ 51 | display: inline-block; 52 | float: right; 53 | cursor: pointer; 54 | /*margin-top: 5px; 55 | margin-right: 10px;*/ 56 | } 57 | #open-menu { 58 | opacity: 0; 59 | z-index: 1153; 60 | } 61 | #open-menu-icon { 62 | z-index: 1152; 63 | } 64 | nav { 65 | position: absolute; 66 | right: 0px; 67 | background: #e8e8e8; 68 | display: none; 69 | } 70 | nav.menuShow { 71 | padding-top: 10px; 72 | display: inline; 73 | z-index: 1150; 74 | } 75 | nav ul li { 76 | margin: 10px; 77 | } 78 | } 79 | 80 | nav { 81 | font-size: 16px; 82 | } 83 | nav ul { 84 | list-style-type: none; 85 | } 86 | 87 | @media screen and (min-width: 600px) { 88 | nav { 89 | font-weight: normal; 90 | display: inline-table; 91 | float: right; 92 | margin-left: 15px; 93 | } 94 | nav ul { 95 | margin: 0; 96 | padding: 0; 97 | } 98 | nav ul li { 99 | display: inline; 100 | } 101 | nav ul li a { 102 | padding: 6px 8px; 103 | } 104 | #open-menu, #open-menu-icon { 105 | display: none; 106 | } 107 | } 108 | nav ul li a:hover { 109 | background-color: #454545; 110 | color: white; 111 | } 112 | 113 | @keyframes spin { 114 | from { 115 | transform: rotate(0deg); 116 | } 117 | to { 118 | transform: rotate(360deg); 119 | } 120 | } 121 | 122 | #loading { 123 | position: relative; 124 | visibility: none; 125 | animation: spin 2s steps(9) infinite; 126 | left: 40px; 127 | top: 0px; 128 | margin-top: 10px; 129 | margin-left: 10px; 130 | z-index: 800; 131 | } 132 | 133 | #mapid { 134 | width: 100%; 135 | height: calc(100% - 30px); 136 | } 137 | 138 | article { 139 | margin: 10px; 140 | max-width: 800px; 141 | } 142 | 143 | #motd_overlay { 144 | background-color: white; 145 | max-width: 800px; 146 | display: none; 147 | margin-left: auto; 148 | margin-right: auto; 149 | padding: 10px; 150 | } 151 | 152 | #motd_image { 153 | margin-right: 14px; 154 | } 155 | 156 | div.motd-block { 157 | margin-bottom: 30px; 158 | } 159 | 160 | #close_icon { 161 | margin-left: 10px; 162 | cursor: pointer; 163 | } 164 | 165 | .float_left { 166 | float: left; 167 | margin-bottom: 10px; 168 | } 169 | 170 | .float_right { 171 | float: right; 172 | margin-bottom: 10px; 173 | } 174 | 175 | @media screen and (max-width: 640px) { 176 | #motd_overlay { 177 | width: 75%; 178 | } 179 | } 180 | 181 | div.non-db-note { 182 | background-color: #ddd; 183 | padding: 10px 10px 10px 10px; 184 | } 185 | 186 | #info { 187 | /*position: fixed; 188 | visibility: hidden; 189 | right: 56px; 190 | top: 42px; 191 | z-index: 900;*/ 192 | background-color: white; 193 | box-shadow: 0 1px 5px rgba(0,0,0,0.4); 194 | border-radius: 5px; 195 | } 196 | 197 | /* limit height of individual popus if there is too much text inside */ 198 | div.leaflet-popup-content { 199 | max-height: 65vh; 200 | overflow-y: auto; 201 | } 202 | -------------------------------------------------------------------------------- /webapp/images/marker-red.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 38 | 40 | 41 | 43 | image/svg+xml 44 | 46 | 47 | 48 | 49 | 50 | 52 | 54 | 58 | 62 | 63 | 65 | 70 | 71 | 80 | 89 | 90 | 97 | 101 | 105 | 106 | -------------------------------------------------------------------------------- /webapp/images/loading.svg: -------------------------------------------------------------------------------- 1 | 2 | 13 | 15 | 17 | 18 | 20 | image/svg+xml 21 | 23 | 24 | 25 | 26 | 27 | 30 | 35 | 40 | 45 | 50 | 55 | 60 | 65 | 70 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /api-doc/db-strecken-info/HimDetails.md: -------------------------------------------------------------------------------- 1 | # HimDetails 2 | 3 | This request exists in two variations: 4 | 5 | * If `input` is an empty string, it request returns disruptions which affect a large area, e.g. a whole state or that a neighbouring railway operator is unable to accept trains due to a disruption on his network. 6 | * If `input` is the textual ID of a disruption, e.g. `HIM_FREETEXT_136758`, you will get details about the disruption and its geometry. 7 | 8 | ## Query Parameters 9 | 10 | The `req` property of the query has following value: 11 | 12 | ```json 13 | {"input":"","getTrains":false,"date":"20170512","time":"180000"} 14 | ``` 15 | 16 | This call is also used to query details about a local disruption. In that case `input` is the `HIM_FREETEXT_`… reference ID of the marker. 17 | 18 | ```json 19 | {"input":"HIM_FREETEXT_136758","getTrains":false,"date":"20170513","time":"110000"} 20 | ``` 21 | 22 | * `date`: string, common date format (see above). This is the date the user queried information for. 23 | * `time`: string, common time format (see above). This is the time the user queried information for. 24 | 25 | ## Response 26 | 27 | The response contains usually nearly no information. 28 | 29 | ```json 30 | { 31 | "ext": "DBNETZZUGRADAR.2", 32 | "id": "rpg2qszmkqx5924c", 33 | "lang": "deu", 34 | "svcResL": [ 35 | { 36 | "err": "OK", 37 | "errTxt": "", 38 | "id": "", 39 | "meth": "HimDetails", 40 | "res": { 41 | "common": { 42 | "crdSysL": [], 43 | "himMsgEdgeL": [], 44 | "himMsgEventL": [], 45 | "himMsgRegionL": [], 46 | "icoL": [], 47 | "layerL": [], 48 | "locL": [], 49 | "opL": [], 50 | "polyL": [], 51 | "prodL": [], 52 | "remL": [] 53 | }, 54 | "lastUpd": "2017-05-05, 10:42" 55 | } 56 | } 57 | ], 58 | "ver": "1.15" 59 | } 60 | ``` 61 | 62 | If there are informations, it follows the following documentation: 63 | 64 | * `common`: object 65 | * `edgeRefL`: array of integer, list of edge references used by this response 66 | * `lastUpd`: string, last update, format YYYY-MM-DD, HH:MM 67 | * `msgRefL`: array of integer, list of message references used by this response 68 | 69 | The `common` property is a object with following properties: 70 | 71 | * `crdSysL`: empty array 72 | * `himL`: array of objects 73 | * `himMsgEdgeL`: array of objects, documented at [HimGeoPos](HimGeoPos.md) 74 | * `himMsgEventL`: array of objects, documented at [HimGeoPos](HimGeoPos.md), encoding beginning and end of a disruption and the affected line numbers (VzG numbers) 75 | * `himMsgRegionL`: empty array 76 | * `icoL`: array of objects 77 | * `layerL`: empty array 78 | * `locL`: array of operating sites, see [`locL`](LocGeoPos.md) at `LocGeoPos` API call 79 | ** only the properties `crd`, `extId`, `lid` and `name` are set 80 | * `opL`: empty array 81 | * `polyL`: empty array 82 | * `prodL`: empty array 83 | * `remL`: array of objects 84 | 85 | ??? incomplete, some properties are missing 86 | 87 | ### himL 88 | 89 | `himL` has following properties: 90 | 91 | * `act`: boolean (true) 92 | * `cat`: integer (seems to be 0 both for large and local disruptions) 93 | * `displayHead`: boolean (false both) 94 | * `eDate`: string, common date format, end of disruption 95 | * `eTime`: string, common time format, end of disruption 96 | * `edgeRefL`: array of integer, list of all used event IDs 97 | * `eventRefL`: array of integer, list of all used event IDs 98 | * `head`: string, e.g. `Sammelmeldung: Sonstige Unregelm\u00e4\u00dfigkeit` or `St\u00f6rung: Witterungsbedingte Einfl\u00fcsse - Sturmsch\u00e4den` 99 | * `hid`: string, e.g. `HIM_FREETEXT_136770`. This is the common reference used by various API calls. 100 | * `icoX`: integer, e.g. 0 101 | * `impactL`: array of objects 102 | * `lModDate`: string, common date format, day of last update of this entry 103 | * `lModTime`: string, common time format, time of last update of this entry 104 | * `prio`: integer, e.g. 1 105 | * `prod`: integer, e.g. 3 106 | * `pubChL`: array of objects, see `HimGeoPos` call 107 | * `rRefL`: array of integer 108 | * `sDate`: string, common date format, beginning of the disruption 109 | * `sTime`: string, common time format, beginning of the disruption 110 | * `text`: string, text message about the disruption 111 | 112 | 113 | ### impactL 114 | 115 | This array has usually 1 to 3 elements, one per "product" (SPFV, SPNV, SGV). 116 | 117 | * `icoX`: integer, e.g. 0, reference to an icon in `icoL` list 118 | * `prio`: integer 119 | * `impact`: string, consequence of the disruption. Following values have been seen already (incomplete list): 120 | ** `Zur\u00fcckhalten von Z\u00fcgen` 121 | ** `Fahrzeitverl\u00e4ngerung auf Regellaufweg` 122 | * `prodCode`: string, either `SPFV`, `SPNV` or `SGV` 123 | * `products`: integer, 3 (SPFV), 24 (SPNV), 1920 (SGV) 124 | 125 | ### icoL 126 | 127 | This is the list of icons used by the elements of the `himL` array. 128 | 129 | * `res`: string, reference key of the icon, which can be mapped to a relative URL using `dyn.js` 130 | 131 | ### remL 132 | 133 | This type seems to be used as a key value store. Each instance of this type represents a key value pair. 134 | 135 | * `code`: string – key 136 | * `txtN`: string – value (might be `false`!) 137 | * `type`: string, often `M` 138 | 139 | Common values for `code` are: 140 | 141 | * isFreetext 142 | * dbnetz_subcategory1stLevel 143 | * dbnetz_effects: serveral values encoded as JSON but with escaping of quotation marks 144 | * dbnetz_subcategory2ndLevel 145 | * dbnetz_category 146 | * dbnetz_prognosis 147 | 148 | These entries are refenced from `himL`'s property `rRefL`. Each integer in `rRefL` refers to the n-th entry in the `remL` array. 149 | -------------------------------------------------------------------------------- /api-doc/db-strecken-info/README.md: -------------------------------------------------------------------------------- 1 | # strecken.info API 2 | 3 | This is the inofficial documentation of the API of strecken.info, a map which shows disruptions and constructions on the network of DB Netz AG. 4 | The API does not cover the networks of S-Bahn Berlin and S-Bahn Hamburg although their infrastructure is operated by DB Netz AG, too. 5 | 6 | ## Coordinate Format 7 | 8 | Coordinates used in the query parameters and in the response are WGS84 geographical coordinates (EPSG:4326) but are multiplied by 10^6. 9 | The API returns integers only but the query parameters may contain floating point numbers. 10 | 11 | A coordinates object has following parameters: 12 | 13 | * `type`: String, z.B. `WGS84` 14 | * `x`: easting (typisch) 15 | * `y`: northing (typisch) 16 | * `z`: elevation, optional 17 | 18 | `z` is optional, all others seem to be mandatory. 19 | 20 | 21 | ## Date and Time Format 22 | 23 | If not otherwise noted, dates are encoded as strings using following pattern: `YYYYMMDD`. Times are also strings and use the pattern `HHMMSS`. 24 | 25 | ## Querying the API 26 | 27 | mgate.exe is the API endpoint. All queries are done as HTTP POST requests, the payload looks like this: 28 | 29 | ```json 30 | { 31 | "auth": { 32 | "aid": "hf7mcf9bv3nv8g5f", 33 | "type": "AID" 34 | }, 35 | "client": { 36 | "id": "DBZUGRADARNETZ", 37 | "name": "webapp", 38 | "type": "WEB", 39 | "v": "0.1.0" 40 | }, 41 | "ext": "DBNETZZUGRADAR.2", 42 | "formatted": false, 43 | "lang": "deu", 44 | "svcReqL": [ 45 | { 46 | "cfg": { 47 | "cfgGrpL": [], 48 | "cfgHash": "i74dckao7PmBwS0rbk0p" 49 | }, 50 | "meth": "LocGeoPos", 51 | "req": { 52 | "rect": { 53 | "llCrd": { 54 | "x": 13540992.736816406, 55 | "y": 51613752.957501 56 | }, 57 | "urCrd": { 58 | "x": 14005508.422851562, 59 | "y": 51698310.32893037 60 | } 61 | } 62 | } 63 | } 64 | ], 65 | "ver": "1.15" 66 | } 67 | ``` 68 | 69 | or this: 70 | 71 | ```json 72 | { 73 | "auth": { 74 | "aid": "hf7mcf9bv3nv8g5f", 75 | "type": "AID" 76 | }, 77 | "client": { 78 | "id": "DBZUGRADARNETZ", 79 | "name": "webapp", 80 | "type": "WEB", 81 | "v": "0.1.0" 82 | }, 83 | "ext": "DBNETZZUGRADAR.2", 84 | "formatted": false, 85 | "lang": "deu", 86 | "svcReqL": [ 87 | { 88 | "cfg": { 89 | "cfgGrpL": [], 90 | "cfgHash": "i74dckao7PmBwS0rbk0p" 91 | }, 92 | "meth": "HimDetails", 93 | "req": { 94 | "date": "20170512", 95 | "getTrains": false, 96 | "input": "", 97 | "time": "180000" 98 | } 99 | } 100 | ], 101 | "ver": "1.15" 102 | } 103 | ``` 104 | 105 | The official web application always sets `ver`, `lang`, `auth`, `client`, `formatted` and `ext` to the same values. `svcReqL` is the interesting field. 106 | 107 | The payload looks like JSON but it seems that the backend does not use a full JSON parser. The parameter list below lists some parameters whose absense causes a parse error. 108 | 109 | The meaning of the parameters: 110 | 111 | * `ver`: string. If missing, a parse error will be returned. 112 | * `lang`: string. If missing, nothing changes. 113 | * `auth`: object. If missing, following will be returned: `{"ver":"1.15","ext":"DBNETZZUGRADAR.2","lang":"deu","id":"ga2ewshw6wky8wcc","err":"AUTH","svcResL":[]}` 114 | * `client`: object. If missing, an error of type "nullptr" will be returnd: `{"ver":"1.15","ext":"DBNETZZUGRADAR.2","lang":"deu","err":"NULLPTR","svcResL":[]}` 115 | * `formatted`: boolean, if set to `true` the response will be formatted JOSN, intendation 2 spaces. But the formatting is buggy, the elements of the `rRefL` array are not intended. 116 | * `cfg`: object. If this is missing, an authentication error will be returned. 117 | ** `cfgGrpL`: empty array. If this is missing, nothing changes. 118 | * `rect`: object. If the bounding box misses at the `HimGeoPos` query, the API will respond with an empty JSON wireframe: `{"ver":"1.15","ext":"DBNETZZUGRADAR.2","lang":"deu","id":"5e42wsn24w4w9g88","svcResL":[{"id":"","meth":"HimGeoPos","err":"OK","res":{"common":{"locL":[],"prodL":[],"polyL":[],"layerL":[],"crdSysL":[],"opL":[],"remL":[],"icoL":[],"himMsgEdgeL":[],"himMsgRegionL":[],"himMsgEventL":[]},"lastUpd":"2017-06-09, 11:47"},"errTxt":""}]}` 119 | * `getPolyline`: boolean. Does what its name says. 120 | 121 | ### Error Repsonses 122 | 123 | #### Parse Error 124 | 125 | ```json 126 | {"ver":"1.15","lang":"deu","err":"PARSE","svcResL":[]} 127 | ``` 128 | 129 | #### Authentication Error 130 | 131 | ```json 132 | {"ver":"1.15","ext":"DBNETZZUGRADAR.2","lang":"deu","err":"AUTH","svcResL":[]} 133 | ``` 134 | 135 | ### svcReqL 136 | 137 | svcReqL which contains an object with following attributes: 138 | 139 | * `meth`: name of the API call. Following API calls are available: [`HimGeoPos`](HimGeoPos.md), [`HimDetails`](HimDetails.md) and [`LocGeoPos`](LocGeoPos.md). See the following sections for the responses of these calls. 140 | * `req`: object containing some query parameters dependend on the API call being used. See the API calls below for the parameters. 141 | * `cfg`: object which always seems to be `{"cfgGrpL":[],"cfgHash":"i74dckao7PmBwS0rbk0p"}` 142 | 143 | Zum Inhalt von `req` siehe unten. 144 | 145 | ## Available API Calls 146 | 147 | * [LocGeoPos](LocGeoPos.md) 148 | * [HimDetails](HimDetails.md) 149 | * [HimGeoPos](HimGeoPos.md) returns a list of all planned and unplanned disruptions. The events have an ID beginning with `HIM_FREETEXT` which is used for the `HimDetails` call to get the location and the event message. This call also returns operating sites with a reduced number of attributes 150 | 151 | ## Respsonses 152 | 153 | The responses always have following properties: 154 | 155 | * `ext` 156 | * `id` 157 | * `lang` 158 | * `svcResL`: object 159 | 160 | A `svcResL` object has following properties: 161 | 162 | * `err`: string, see `LocGeoPos` 163 | * `errTxt`: string 164 | * `id`: string, empty 165 | * `meth`: string `HimGeoPos` 166 | * `res`: Objekt 167 | * `ver`: String, `1.15` 168 | 169 | The properties of the `res` object depend on the API call. 170 | -------------------------------------------------------------------------------- /api-doc/db-strecken-info/HimGeoPos.md: -------------------------------------------------------------------------------- 1 | # HimGeoPos 2 | 3 | ## Query Parameters 4 | 5 | `req` looks like this 6 | 7 | ```json 8 | { 9 | "dateB": "20170512", 10 | "dateE": "20170513", 11 | "getPolyLine": true, 12 | "himFltrL": [ 13 | { 14 | "mode": "INC", 15 | "type": "HIMCAT", 16 | "value": "0" 17 | }, 18 | { 19 | "mode": "INC", 20 | "type": "HIMCAT", 21 | "value": "1" 22 | }, 23 | { 24 | "mode": "INC", 25 | "type": "PROD", 26 | "value": 3 27 | } 28 | ], 29 | "maxNum": 5000, 30 | "onlyHimId": true, 31 | "prio": 100, 32 | "rect": { 33 | "llCrd": { 34 | "x": 12611960, 35 | "y": 51444636 36 | }, 37 | "urCrd": { 38 | "x": 14934540, 39 | "y": 51867426 40 | } 41 | }, 42 | "timeB": "180000", 43 | "timeE": "000000" 44 | } 45 | ``` 46 | 47 | ### Parameters Which Are Known to Change Something 48 | 49 | * `prio`: maximum priority value (very important messages have a *low* prio number!) 50 | * `rect`: array of objects, geographical bounding box filter 51 | * `onlyHimId`: boolean. Additional information about the the disruption as human-readable text is added if this parameter is set `false`. 52 | 53 | * `himFltrL`: array of objects 54 | ** `type`: string, key you want to filter (left hand side of the comparison). Known keys are `HIMCAT` and `PROD`. 55 | ** `mode`: string, operator. Known value is `INC` (seems to mean "include") which adds an AND between the expressions and makes the expression itself being an equality filter (`key == value`). 56 | ** `value`: string, value you want to filter (right hand side of the comparison) 57 | 58 | Filtering by `HIMCAT` means to filter for `res.common.himL[].cat` and can be used to drop all planned or unplanned disruptions. Valid values for HIMCAT are `0` for unplanned and `1` for planned disruptions. 59 | 60 | Filtering by `PROD` means to filter the results by the type of traffic which is affected. `PROD` is a bitmask. Only the meaning of some bits is know currently (counted from small to large): 61 | 62 | * bit 1 and 2: long distance passenger trains 63 | * bit 3: message of the day (large box over the original web application) in case of large disruptions (storms, malware) 64 | * bit 4 and 5: local passenger trains 65 | * bit 6 and 7: unknow/ssem to be unused 66 | * bit 8 to 10: freight trains 67 | 68 | You don't have to (but you can) set all bits of category to true. If your filter is `0b10010` you will get results for local and long distance passenger trains. `0b01001`, `0b11011` and `0b11111` would return the same result. 69 | 70 | If you supplie multiple `PROD` filters, only last `PROD` filter will be applied. 71 | 72 | Best practice: If you use `0xFF` (255) as `PROD` filter, disruptions for all three modes of transport are included and you can keep the number of API requests low. 73 | 74 | ```json 75 | [{"type":"HIMCAT","mode":"INC","value":"0"},{"type":"PROD","mode":"INC","value":1}] 76 | ``` 77 | 78 | 79 | ### Examples: 80 | 81 | All unplanned disruptions in Germany: 82 | 83 | ```json 84 | { 85 | "dateB": "20170512", 86 | "dateE": "20170513", 87 | "getPolyLine": true, 88 | "himFltrL": [ 89 | { 90 | "mode": "INC", 91 | "type": "HIMCAT", 92 | "value": "0" 93 | }, 94 | { 95 | "mode": "INC", 96 | "type": "HIMCAT", 97 | "value": "1023" 98 | } 99 | ], 100 | "maxNum": 5000, 101 | "onlyHimId": false, 102 | "prio": 100, 103 | "rect": { 104 | "llCrd": { 105 | "x": 12611960, 106 | "y": 51444636 107 | }, 108 | "urCrd": { 109 | "x": 14934540, 110 | "y": 51867426 111 | } 112 | }, 113 | "timeB": "180000", 114 | "timeE": "000000" 115 | } 116 | 117 | ``` 118 | 119 | If you only want to get messages of the highest priority (message of the day), use following parameters: 120 | 121 | ```json 122 | { 123 | "auth": { 124 | "aid": "hf7mcf9bv3nv8g5f", 125 | "type": "AID" 126 | }, 127 | "client": { 128 | "id": "DBZUGRADARNETZ", 129 | "name": "webapp", 130 | "type": "WEB", 131 | "v": "0.1.0" 132 | }, 133 | "ext": "DBNETZZUGRADAR.2", 134 | "formatted": false, 135 | "lang": "deu", 136 | "svcReqL": [ 137 | { 138 | "cfg": { 139 | "cfgGrpL": [], 140 | "cfgHash": "i74dckao7PmBwS0rbk0p" 141 | }, 142 | "meth": "HimGeoPos", 143 | "req": { 144 | "himFltrL": [ 145 | { 146 | "mode": "INC", 147 | "type": "HIMCAT", 148 | "value": "0" 149 | }, 150 | { 151 | "mode": "INC", 152 | "type": "PROD", 153 | "value": 4 154 | } 155 | ], 156 | "maxNum": 5000, 157 | "onlyHimId": false, 158 | "prio": 100 159 | } 160 | } 161 | ], 162 | "ver": "1.15" 163 | } 164 | ``` 165 | 166 | 167 | ## Respsonse 168 | 169 | The `res` objekt has following properties: 170 | 171 | * `common`: object 172 | * `edgeRefL`: array of type integer, list of edges referenced 173 | * `lastUpd`: string, format `YYYY-MM-DD, HH:MM` 174 | * `msgRefL`: array of integer, list of referenced messages? 175 | 176 | ### common 177 | 178 | * `crdSysL`: array with objects, descriptions of the used coordinate systems 179 | * `himL`: array of objects 180 | * `himMsgEdgeL`: array of objects 181 | * `himMsgEventL`: array of objects 182 | * `himMsgRegionL`: array of objects, regions affected by large disruptions 183 | * `icoL`: arary of objects 184 | ** `res`: string, e.g. `HIM11307`, `HIM11203`, `HIM11012`, `HIM10001`, `HIM11215`. This is the type of disruption. These IDs are used to look up which icon should be placed on the map. The icons themselves give a rough information about the consequences of a disruption. 185 | * `layerL`: array of objects 186 | * `locL`: array of objects, see [`locL`](LocGeoPos.md) at `LocGeoPos` API call 187 | ** only the properties `crd`, `extId`, `lid` and `name` are set 188 | * `opL`: empty array 189 | * `polyL`: array of objects, defining the geometry of the edges which are polylines 190 | * `prodL`: empty array 191 | * `remL`: array of objects, empty if `onlyHimID` was set to `false`. See [HimDetails](HimDetails.md) for details. 192 | 193 | ### crdSysL 194 | 195 | A `crdSysL` object has following properties: 196 | 197 | * `id`: string `standard` 198 | * `index`: integer, starting with 0 199 | * `type`: string, usually `WGS84` 200 | 201 | Up to know only responses are known which use one coordinate system, so `index` is always `0` and `id` always `standard`. 202 | 203 | ### himL 204 | 205 | A `himL` object has following properties: 206 | 207 | * `act`: boolean, usually `true` but `false` for large-scale disruptions which cover an area 208 | * `cat`: integer, only known to be `1` for planned disruptions and `0` for unplanned disruptions 209 | * `displayHead`: boolean, only known to be `false` 210 | * `eDate`: string, typical date format, beginning of a disruption 211 | * `eTime`: string, typical time format, beginning of a disruption 212 | * `edgeRefL`: array of integer, seems to be a list of edges which are the geometry of this feature. If this list is missing, it is an disruption which covers a large area, e.g. a failure of a important IT service or a WannaCry attack. 213 | * `eventRefL`: array of integer. These numbers are references to the n-th entries in `himMsgEventL`. 214 | * `hid`: string, known values are `HIM_FREETEXT_108004`, `HIM_FREETEXT_111493` and others 215 | * `icoX`: integer, index in `icoL` array for this disruption 216 | * `lModDate`: date of last update, typical date format 217 | * `lModTime`: time of last update, typical time format 218 | * `prio`: integer, known values: 80, 65, 24, 16, 63, 70 and 1. 1 is used if larger unplanned attacks occur, e.g. storms or malware attacks. 219 | * `prod`: integer, known values: `16383`, `3` 220 | * `pubChL`: array of objects, optional parameter, sometimes missing 221 | * `rRefL`: array of integer, list of referenced texts from the `remL` array 222 | * `regionRefL`: array of integers, refers to a list of regions which are affected. This property is only set if it is a disruption covering a large area. 223 | * `sDate`: string, typical date format, end of a disruption 224 | * `sTime`: string, typical time format, end of a disruption 225 | * `impactL`: array of objects. See [HimGeoPos](HimGeoPos.md) for details. It has only the properties `products`, `icoX` and `prio` if `onlyHimId` was set to `true`. 226 | 227 | Please note that planned disruptions often have multiple time intervals which they are valid on, e.g. a construction site every night from 01:00 am to 04:30 am. 228 | 229 | Following additional properties are set if `onlyHimId` in the request parameters was set to `false`: 230 | 231 | * `head`: string, type of disruption, e.g. `Befahren Ggl auf Befehl je 23:35-00:35 durchg. SGV HA-HLAN-HHIG-HBHE umleiten` or `Totalsperrung je 00:35-07:00 durchg. HA SG 3,4,201`. 232 | * `text`: string, reason of the disruption, e.g. `Arbeiten an LST-Anlagen Neubau ESTW Hamm 1. Baustufe`. 233 | 234 | 235 | ### pubChL 236 | 237 | A `pubChL` object has following properties: 238 | 239 | * `fDate`: string, typical date format, begin of a disruption 240 | * `fTime`: string, typical time format, begin of a disruption 241 | * `name`: string, e.g. `1` 242 | * `tDate`: string, typical date format, end of a disruption 243 | * `tTime`: string, typical time format, end of a disruption 244 | 245 | `fDate` is equal to `tDate and `fTime` is equal to `tTime` if it is no planned disruption. If you need the end time 246 | of an unplanned disruption, you have to get the index of the event in `himMsgEventL` by querying `eventRefL`. 247 | 248 | ### himMsgEdgeL 249 | 250 | A `himMsgEdgeL` has following properties: 251 | 252 | * `dir`: integer, known values are 3, 2, 1 253 | * `fLocX`: integer, seems to be an index in the array of `locL` objects, beginning of a line section which is affected by the disruption 254 | * `icoCrd`: object, location where to place the icon/marker? Properties are the same as for all other coordinates objects 255 | * `icoX`: integer, known values are 1, 4, 2 256 | * `msgRefL`: array of integer 257 | * `tLocX`: integer. Seems not to be set if `PolyX` is set, opposite of `fLocX`. 258 | * `polyX`: integer. Seems not to be set if `tLocX` is set, seems to be a reference to another object. 259 | 260 | ### himMsgRegionL 261 | 262 | A `himMsgRegionL` object has following properties: 263 | 264 | * `name`: string, name of the region, e.g. `Süd` 265 | * `polyX`: integer 266 | * `polyTypeL`: array of boolean, only known length: 1, only known element: `true` 267 | * `icoCrd`: coordinates of the icon, see `himMsgEdgeL` for details 268 | * `msgRefL`: array of integer, referenced message 269 | * `polyX`: integer, incremented counter but starting with 562? 270 | 271 | ### himMsgEventL 272 | 273 | A `himMsgEventL` has following properties: 274 | 275 | * `fDate`: string, typical date format 276 | * `fLocX`: integer, often 0 but higher values below 100 occur frequently 277 | * `fTime`: string, typical time format 278 | * `sectionNums: array of string, seems to be line numbers (VzG numbers) of the railway lines used by the geometry 279 | * `tDate`: string, typical date format 280 | * `tLocX`: integer, see fLocX 281 | * `tTime`: string, typical time format 282 | 283 | ### layerL 284 | 285 | A `layerL` object has following properties: 286 | 287 | * `annoCnt`: integer, 0 288 | * `id`: string, `standard` 289 | * `index`: 0 290 | 291 | ### polyL 292 | 293 | A `polyL` object has following properties: 294 | 295 | * `crdEncF`: string, e.g. `??????????????????????????`; usually question marks, might be shorter or longer than this example. Looks like being a pattern or bitmask. 296 | * `crdEncS`: string, e.g. `NNNNNNNNNNNNNNNNNNNNNNNNNN`; usually only character `N`, same length as `crdEncS` 297 | * `crdEncYX`: string, [Google Polyline](https://developers.google.com/maps/documentation/utilities/polylinealgorithm), e.g. `ojq{HsbhlAbGnGjAnAhArAdAxA`A~AtArBr@fA`CfE~@fBx@lBr@rBl@|Bd@dCXfCRlCJnC?pCGnCQlCWjCw@pG_ApGsBbPgBrN??` 298 | * `crdEncZ`: string, e.g. `??????????????????????????`; usually question marks, same length as `crdEncS`. 299 | * `delta`: boolean, `True` is the only known value 300 | * `dim`: integer, `3` is the only known value 301 | * `type`: string, coordinate system, `WGS84` is the only known value 302 | 303 | -------------------------------------------------------------------------------- /webapp/leaflet.css: -------------------------------------------------------------------------------- 1 | /* required styles */ 2 | 3 | .leaflet-pane, 4 | .leaflet-tile, 5 | .leaflet-marker-icon, 6 | .leaflet-marker-shadow, 7 | .leaflet-tile-container, 8 | .leaflet-pane > svg, 9 | .leaflet-pane > canvas, 10 | .leaflet-zoom-box, 11 | .leaflet-image-layer, 12 | .leaflet-layer { 13 | position: absolute; 14 | left: 0; 15 | top: 0; 16 | } 17 | .leaflet-container { 18 | overflow: hidden; 19 | } 20 | .leaflet-tile, 21 | .leaflet-marker-icon, 22 | .leaflet-marker-shadow { 23 | -webkit-user-select: none; 24 | -moz-user-select: none; 25 | user-select: none; 26 | -webkit-user-drag: none; 27 | } 28 | /* Safari renders non-retina tile on retina better with this, but Chrome is worse */ 29 | .leaflet-safari .leaflet-tile { 30 | image-rendering: -webkit-optimize-contrast; 31 | } 32 | /* hack that prevents hw layers "stretching" when loading new tiles */ 33 | .leaflet-safari .leaflet-tile-container { 34 | width: 1600px; 35 | height: 1600px; 36 | -webkit-transform-origin: 0 0; 37 | } 38 | .leaflet-marker-icon, 39 | .leaflet-marker-shadow { 40 | display: block; 41 | } 42 | /* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */ 43 | /* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */ 44 | .leaflet-container .leaflet-overlay-pane svg, 45 | .leaflet-container .leaflet-marker-pane img, 46 | .leaflet-container .leaflet-shadow-pane img, 47 | .leaflet-container .leaflet-tile-pane img, 48 | .leaflet-container img.leaflet-image-layer { 49 | max-width: none !important; 50 | } 51 | 52 | .leaflet-container.leaflet-touch-zoom { 53 | -ms-touch-action: pan-x pan-y; 54 | touch-action: pan-x pan-y; 55 | } 56 | .leaflet-container.leaflet-touch-drag { 57 | -ms-touch-action: pinch-zoom; 58 | } 59 | .leaflet-container.leaflet-touch-drag.leaflet-touch-zoom { 60 | -ms-touch-action: none; 61 | touch-action: none; 62 | } 63 | .leaflet-tile { 64 | filter: inherit; 65 | visibility: hidden; 66 | } 67 | .leaflet-tile-loaded { 68 | visibility: inherit; 69 | } 70 | .leaflet-zoom-box { 71 | width: 0; 72 | height: 0; 73 | -moz-box-sizing: border-box; 74 | box-sizing: border-box; 75 | z-index: 800; 76 | } 77 | /* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */ 78 | .leaflet-overlay-pane svg { 79 | -moz-user-select: none; 80 | } 81 | 82 | .leaflet-pane { z-index: 400; } 83 | 84 | .leaflet-tile-pane { z-index: 200; } 85 | .leaflet-overlay-pane { z-index: 400; } 86 | .leaflet-shadow-pane { z-index: 500; } 87 | .leaflet-marker-pane { z-index: 600; } 88 | .leaflet-tooltip-pane { z-index: 650; } 89 | .leaflet-popup-pane { z-index: 700; } 90 | 91 | .leaflet-map-pane canvas { z-index: 100; } 92 | .leaflet-map-pane svg { z-index: 200; } 93 | 94 | .leaflet-vml-shape { 95 | width: 1px; 96 | height: 1px; 97 | } 98 | .lvml { 99 | behavior: url(#default#VML); 100 | display: inline-block; 101 | position: absolute; 102 | } 103 | 104 | 105 | /* control positioning */ 106 | 107 | .leaflet-control { 108 | position: relative; 109 | z-index: 800; 110 | pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ 111 | pointer-events: auto; 112 | } 113 | .leaflet-top, 114 | .leaflet-bottom { 115 | position: absolute; 116 | z-index: 1000; 117 | pointer-events: none; 118 | } 119 | .leaflet-top { 120 | top: 0; 121 | } 122 | .leaflet-right { 123 | right: 0; 124 | } 125 | .leaflet-bottom { 126 | bottom: 0; 127 | } 128 | .leaflet-left { 129 | left: 0; 130 | } 131 | .leaflet-control { 132 | float: left; 133 | clear: both; 134 | } 135 | .leaflet-right .leaflet-control { 136 | float: right; 137 | } 138 | .leaflet-top .leaflet-control { 139 | margin-top: 10px; 140 | } 141 | .leaflet-bottom .leaflet-control { 142 | margin-bottom: 10px; 143 | } 144 | .leaflet-left .leaflet-control { 145 | margin-left: 10px; 146 | } 147 | .leaflet-right .leaflet-control { 148 | margin-right: 10px; 149 | } 150 | 151 | 152 | /* zoom and fade animations */ 153 | 154 | .leaflet-fade-anim .leaflet-tile { 155 | will-change: opacity; 156 | } 157 | .leaflet-fade-anim .leaflet-popup { 158 | opacity: 0; 159 | -webkit-transition: opacity 0.2s linear; 160 | -moz-transition: opacity 0.2s linear; 161 | -o-transition: opacity 0.2s linear; 162 | transition: opacity 0.2s linear; 163 | } 164 | .leaflet-fade-anim .leaflet-map-pane .leaflet-popup { 165 | opacity: 1; 166 | } 167 | .leaflet-zoom-animated { 168 | -webkit-transform-origin: 0 0; 169 | -ms-transform-origin: 0 0; 170 | transform-origin: 0 0; 171 | } 172 | .leaflet-zoom-anim .leaflet-zoom-animated { 173 | will-change: transform; 174 | } 175 | .leaflet-zoom-anim .leaflet-zoom-animated { 176 | -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1); 177 | -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1); 178 | -o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1); 179 | transition: transform 0.25s cubic-bezier(0,0,0.25,1); 180 | } 181 | .leaflet-zoom-anim .leaflet-tile, 182 | .leaflet-pan-anim .leaflet-tile { 183 | -webkit-transition: none; 184 | -moz-transition: none; 185 | -o-transition: none; 186 | transition: none; 187 | } 188 | 189 | .leaflet-zoom-anim .leaflet-zoom-hide { 190 | visibility: hidden; 191 | } 192 | 193 | 194 | /* cursors */ 195 | 196 | .leaflet-interactive { 197 | cursor: pointer; 198 | } 199 | .leaflet-grab { 200 | cursor: -webkit-grab; 201 | cursor: -moz-grab; 202 | } 203 | .leaflet-crosshair, 204 | .leaflet-crosshair .leaflet-interactive { 205 | cursor: crosshair; 206 | } 207 | .leaflet-popup-pane, 208 | .leaflet-control { 209 | cursor: auto; 210 | } 211 | .leaflet-dragging .leaflet-grab, 212 | .leaflet-dragging .leaflet-grab .leaflet-interactive, 213 | .leaflet-dragging .leaflet-marker-draggable { 214 | cursor: move; 215 | cursor: -webkit-grabbing; 216 | cursor: -moz-grabbing; 217 | } 218 | 219 | /* marker & overlays interactivity */ 220 | .leaflet-marker-icon, 221 | .leaflet-marker-shadow, 222 | .leaflet-image-layer, 223 | .leaflet-pane > svg path, 224 | .leaflet-tile-container { 225 | pointer-events: none; 226 | } 227 | 228 | .leaflet-marker-icon.leaflet-interactive, 229 | .leaflet-image-layer.leaflet-interactive, 230 | .leaflet-pane > svg path.leaflet-interactive { 231 | pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ 232 | pointer-events: auto; 233 | } 234 | 235 | /* visual tweaks */ 236 | 237 | .leaflet-container { 238 | background: #ddd; 239 | outline: 0; 240 | } 241 | .leaflet-container a { 242 | color: #0078A8; 243 | } 244 | .leaflet-container a.leaflet-active { 245 | outline: 2px solid orange; 246 | } 247 | .leaflet-zoom-box { 248 | border: 2px dotted #38f; 249 | background: rgba(255,255,255,0.5); 250 | } 251 | 252 | 253 | /* general typography */ 254 | .leaflet-container { 255 | font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; 256 | } 257 | 258 | 259 | /* general toolbar styles */ 260 | 261 | .leaflet-bar { 262 | box-shadow: 0 1px 5px rgba(0,0,0,0.65); 263 | border-radius: 4px; 264 | } 265 | .leaflet-bar a, 266 | .leaflet-bar a:hover { 267 | background-color: #fff; 268 | border-bottom: 1px solid #ccc; 269 | width: 26px; 270 | height: 26px; 271 | line-height: 26px; 272 | display: block; 273 | text-align: center; 274 | text-decoration: none; 275 | color: black; 276 | } 277 | .leaflet-bar a, 278 | .leaflet-control-layers-toggle { 279 | background-position: 50% 50%; 280 | background-repeat: no-repeat; 281 | display: block; 282 | } 283 | .leaflet-bar a:hover { 284 | background-color: #f4f4f4; 285 | } 286 | .leaflet-bar a:first-child { 287 | border-top-left-radius: 4px; 288 | border-top-right-radius: 4px; 289 | } 290 | .leaflet-bar a:last-child { 291 | border-bottom-left-radius: 4px; 292 | border-bottom-right-radius: 4px; 293 | border-bottom: none; 294 | } 295 | .leaflet-bar a.leaflet-disabled { 296 | cursor: default; 297 | background-color: #f4f4f4; 298 | color: #bbb; 299 | } 300 | 301 | .leaflet-touch .leaflet-bar a { 302 | width: 30px; 303 | height: 30px; 304 | line-height: 30px; 305 | } 306 | 307 | 308 | /* zoom control */ 309 | 310 | .leaflet-control-zoom-in, 311 | .leaflet-control-zoom-out { 312 | font: bold 18px 'Lucida Console', Monaco, monospace; 313 | text-indent: 1px; 314 | } 315 | .leaflet-control-zoom-out { 316 | font-size: 20px; 317 | } 318 | 319 | .leaflet-touch .leaflet-control-zoom-in { 320 | font-size: 22px; 321 | } 322 | .leaflet-touch .leaflet-control-zoom-out { 323 | font-size: 24px; 324 | } 325 | 326 | 327 | /* layers control */ 328 | 329 | .leaflet-control-layers { 330 | box-shadow: 0 1px 5px rgba(0,0,0,0.4); 331 | background: #fff; 332 | border-radius: 5px; 333 | } 334 | .leaflet-control-layers-toggle { 335 | background-image: url(images/layers.png); 336 | width: 36px; 337 | height: 36px; 338 | } 339 | .leaflet-retina .leaflet-control-layers-toggle { 340 | background-image: url(images/layers-2x.png); 341 | background-size: 26px 26px; 342 | } 343 | .leaflet-touch .leaflet-control-layers-toggle { 344 | width: 44px; 345 | height: 44px; 346 | } 347 | .leaflet-control-layers .leaflet-control-layers-list, 348 | .leaflet-control-layers-expanded .leaflet-control-layers-toggle { 349 | display: none; 350 | } 351 | .leaflet-control-layers-expanded .leaflet-control-layers-list { 352 | display: block; 353 | position: relative; 354 | } 355 | .leaflet-control-layers-expanded { 356 | padding: 6px 10px 6px 6px; 357 | color: #333; 358 | background: #fff; 359 | } 360 | .leaflet-control-layers-scrollbar { 361 | overflow-y: scroll; 362 | padding-right: 5px; 363 | } 364 | .leaflet-control-layers-selector { 365 | margin-top: 2px; 366 | position: relative; 367 | top: 1px; 368 | } 369 | .leaflet-control-layers label { 370 | display: block; 371 | } 372 | .leaflet-control-layers-separator { 373 | height: 0; 374 | border-top: 1px solid #ddd; 375 | margin: 5px -10px 5px -6px; 376 | } 377 | 378 | /* Default icon URLs */ 379 | .leaflet-default-icon-path { 380 | background-image: url(images/marker-icon.png); 381 | } 382 | 383 | 384 | /* attribution and scale controls */ 385 | 386 | .leaflet-container .leaflet-control-attribution { 387 | background: #fff; 388 | background: rgba(255, 255, 255, 0.7); 389 | margin: 0; 390 | } 391 | .leaflet-control-attribution, 392 | .leaflet-control-scale-line { 393 | padding: 0 5px; 394 | color: #333; 395 | } 396 | .leaflet-control-attribution a { 397 | text-decoration: none; 398 | } 399 | .leaflet-control-attribution a:hover { 400 | text-decoration: underline; 401 | } 402 | .leaflet-container .leaflet-control-attribution, 403 | .leaflet-container .leaflet-control-scale { 404 | font-size: 11px; 405 | } 406 | .leaflet-left .leaflet-control-scale { 407 | margin-left: 5px; 408 | } 409 | .leaflet-bottom .leaflet-control-scale { 410 | margin-bottom: 5px; 411 | } 412 | .leaflet-control-scale-line { 413 | border: 2px solid #777; 414 | border-top: none; 415 | line-height: 1.1; 416 | padding: 2px 5px 1px; 417 | font-size: 11px; 418 | white-space: nowrap; 419 | overflow: hidden; 420 | -moz-box-sizing: border-box; 421 | box-sizing: border-box; 422 | 423 | background: #fff; 424 | background: rgba(255, 255, 255, 0.5); 425 | } 426 | .leaflet-control-scale-line:not(:first-child) { 427 | border-top: 2px solid #777; 428 | border-bottom: none; 429 | margin-top: -2px; 430 | } 431 | .leaflet-control-scale-line:not(:first-child):not(:last-child) { 432 | border-bottom: 2px solid #777; 433 | } 434 | 435 | .leaflet-touch .leaflet-control-attribution, 436 | .leaflet-touch .leaflet-control-layers, 437 | .leaflet-touch .leaflet-bar { 438 | box-shadow: none; 439 | } 440 | .leaflet-touch .leaflet-control-layers, 441 | .leaflet-touch .leaflet-bar { 442 | border: 2px solid rgba(0,0,0,0.2); 443 | background-clip: padding-box; 444 | } 445 | 446 | 447 | /* popup */ 448 | 449 | .leaflet-popup { 450 | position: absolute; 451 | text-align: center; 452 | margin-bottom: 20px; 453 | } 454 | .leaflet-popup-content-wrapper { 455 | padding: 1px; 456 | text-align: left; 457 | border-radius: 12px; 458 | } 459 | .leaflet-popup-content { 460 | margin: 13px 19px; 461 | line-height: 1.4; 462 | } 463 | .leaflet-popup-content p { 464 | margin: 18px 0; 465 | } 466 | .leaflet-popup-tip-container { 467 | width: 40px; 468 | height: 20px; 469 | position: absolute; 470 | left: 50%; 471 | margin-left: -20px; 472 | overflow: hidden; 473 | pointer-events: none; 474 | } 475 | .leaflet-popup-tip { 476 | width: 17px; 477 | height: 17px; 478 | padding: 1px; 479 | 480 | margin: -10px auto 0; 481 | 482 | -webkit-transform: rotate(45deg); 483 | -moz-transform: rotate(45deg); 484 | -ms-transform: rotate(45deg); 485 | -o-transform: rotate(45deg); 486 | transform: rotate(45deg); 487 | } 488 | .leaflet-popup-content-wrapper, 489 | .leaflet-popup-tip { 490 | background: white; 491 | color: #333; 492 | box-shadow: 0 3px 14px rgba(0,0,0,0.4); 493 | } 494 | .leaflet-container a.leaflet-popup-close-button { 495 | position: absolute; 496 | top: 0; 497 | right: 0; 498 | padding: 4px 4px 0 0; 499 | border: none; 500 | text-align: center; 501 | width: 18px; 502 | height: 14px; 503 | font: 16px/14px Tahoma, Verdana, sans-serif; 504 | color: #c3c3c3; 505 | text-decoration: none; 506 | font-weight: bold; 507 | background: transparent; 508 | } 509 | .leaflet-container a.leaflet-popup-close-button:hover { 510 | color: #999; 511 | } 512 | .leaflet-popup-scrolled { 513 | overflow: auto; 514 | border-bottom: 1px solid #ddd; 515 | border-top: 1px solid #ddd; 516 | } 517 | 518 | .leaflet-oldie .leaflet-popup-content-wrapper { 519 | zoom: 1; 520 | } 521 | .leaflet-oldie .leaflet-popup-tip { 522 | width: 24px; 523 | margin: 0 auto; 524 | 525 | -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)"; 526 | filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678); 527 | } 528 | .leaflet-oldie .leaflet-popup-tip-container { 529 | margin-top: -1px; 530 | } 531 | 532 | .leaflet-oldie .leaflet-control-zoom, 533 | .leaflet-oldie .leaflet-control-layers, 534 | .leaflet-oldie .leaflet-popup-content-wrapper, 535 | .leaflet-oldie .leaflet-popup-tip { 536 | border: 1px solid #999; 537 | } 538 | 539 | 540 | /* div icon */ 541 | 542 | .leaflet-div-icon { 543 | background: #fff; 544 | border: 1px solid #666; 545 | } 546 | 547 | 548 | /* Tooltip */ 549 | /* Base styles for the element that has a tooltip */ 550 | .leaflet-tooltip { 551 | position: absolute; 552 | padding: 6px; 553 | background-color: #fff; 554 | border: 1px solid #fff; 555 | border-radius: 3px; 556 | color: #222; 557 | white-space: nowrap; 558 | -webkit-user-select: none; 559 | -moz-user-select: none; 560 | -ms-user-select: none; 561 | user-select: none; 562 | pointer-events: none; 563 | box-shadow: 0 1px 3px rgba(0,0,0,0.4); 564 | } 565 | .leaflet-tooltip.leaflet-clickable { 566 | cursor: pointer; 567 | pointer-events: auto; 568 | } 569 | .leaflet-tooltip-top:before, 570 | .leaflet-tooltip-bottom:before, 571 | .leaflet-tooltip-left:before, 572 | .leaflet-tooltip-right:before { 573 | position: absolute; 574 | pointer-events: none; 575 | border: 6px solid transparent; 576 | background: transparent; 577 | content: ""; 578 | } 579 | 580 | /* Directions */ 581 | 582 | .leaflet-tooltip-bottom { 583 | margin-top: 6px; 584 | } 585 | .leaflet-tooltip-top { 586 | margin-top: -6px; 587 | } 588 | .leaflet-tooltip-bottom:before, 589 | .leaflet-tooltip-top:before { 590 | left: 50%; 591 | margin-left: -6px; 592 | } 593 | .leaflet-tooltip-top:before { 594 | bottom: 0; 595 | margin-bottom: -12px; 596 | border-top-color: #fff; 597 | } 598 | .leaflet-tooltip-bottom:before { 599 | top: 0; 600 | margin-top: -12px; 601 | margin-left: -6px; 602 | border-bottom-color: #fff; 603 | } 604 | .leaflet-tooltip-left { 605 | margin-left: -6px; 606 | } 607 | .leaflet-tooltip-right { 608 | margin-left: 6px; 609 | } 610 | .leaflet-tooltip-left:before, 611 | .leaflet-tooltip-right:before { 612 | top: 50%; 613 | margin-top: -6px; 614 | } 615 | .leaflet-tooltip-left:before { 616 | right: 0; 617 | margin-right: -12px; 618 | border-left-color: #fff; 619 | } 620 | .leaflet-tooltip-right:before { 621 | left: 0; 622 | margin-left: -12px; 623 | border-right-color: #fff; 624 | } 625 | -------------------------------------------------------------------------------- /webapp/mapdisplay.js: -------------------------------------------------------------------------------- 1 | // First define some HACON constants ;-) 2 | // HACON coordinate factor 3 | var haconFactor = Math.pow(10, 6); 4 | 5 | var startLatitude = 50.9; // initial latitude of the center of the map 6 | var startLongitude = 10.7; // initial longitude of the center of the map 7 | var startZoom = 8; // initial zoom level 8 | 9 | // If a popup of a marker is open, the markers are not reloaded because disappearing popus confuse users. 10 | var popupOpen = false; 11 | // If the user has already seen the message of the day, this variable is set to false. 12 | var seenMotD = false; 13 | // List of messages of the day – there can be multiple but it is very very rare. 14 | var motDInnerHTML = []; 15 | 16 | // define base map and overlays 17 | var markers = L.layerGroup([]); 18 | var oldMarkers = L.layerGroup([]); 19 | var regionMarkers = L.layerGroup([]); 20 | var ORMTilesLayer = L.tileLayer('https://{s}.tiles.openrailwaymap.org/standard/{z}/{x}/{y}.png', { 21 | // maxZoom: 18, 22 | maxZoom: 18 23 | // attribution: '© OpenStreetMap contributors, Style: CC-BY-SA 2.0 OpenRailwayMap and OpenStreetMap' 24 | }); 25 | var osmOrgTilesLayer = L.tileLayer("//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", { 26 | maxZoom: 19 27 | // attribution: 'Map data © OpenStreetMap contributors, imagery CC-BY-SA' 28 | }); 29 | 30 | // set current layer 31 | var currentBaseLayer = osmOrgTilesLayer; 32 | 33 | 34 | // layer control 35 | var baseLayers = {'OSM Carto': osmOrgTilesLayer}; 36 | var overlays = {'OpenRailwayMap Infrastruktur': ORMTilesLayer, 'Störungen': markers, 'behobene Störungen': oldMarkers, 'Regionalmeldungen': regionMarkers}; 37 | var overlaysMeta = { 38 | 'OpenRailwayMap Infrastruktur': 'orm_infrastructure', 39 | 'Störungen': 'markers', 40 | 'behobene Störungen': 'oldMarkers', 41 | 'Regionalmeldungen': 'regionMarkers' 42 | }; 43 | 44 | var activeLayers = []; 45 | var defaultOverlays = ['markers', 'oldMarkers', 'regionMarkers']; 46 | var initialLayers = [osmOrgTilesLayer]; 47 | 48 | var DisruptionIcon = L.Icon.extend({ 49 | options: { 50 | shadowUrl: 'images/marker-shadow.png', 51 | iconSize: [25, 41], 52 | iconAnchor: [12.5, 41], 53 | popupAnchor: [1, -34], 54 | tooltipAnchor: [16, -28], 55 | shadowSize: [41, 41] 56 | } 57 | }); 58 | 59 | var RegionMessageIcon = L.Icon.extend({ 60 | options: { 61 | shadowUrl: 'images/region-shadow.svg', 62 | iconSize: [30, 28], 63 | iconAnchor: [12, 14], 64 | popupAnchor: [3, -14], 65 | tooltipAnchor: [11, -18], 66 | shadowSize: [45, 32] 67 | } 68 | }); 69 | 70 | function getLayerNameByID(layerID) { 71 | var name = ''; 72 | Object.keys(overlaysMeta).forEach(function(key){ 73 | if (overlaysMeta[key] == layerID) { 74 | name = key; 75 | } 76 | }); 77 | return name; 78 | } 79 | 80 | function parseUrl(url) { 81 | var keyValues = location.hash.substr(1).split("&"); 82 | var queryParams = {}; 83 | keyValues.forEach(function(item) { 84 | var kV = item.split('='); 85 | if (kV.length == 1) { 86 | queryParams[item] = ''; 87 | } else { 88 | try { 89 | queryParams[kV[0]] = decodeURIComponent(kV[1]); 90 | } catch (e) { 91 | console.error(e) 92 | } 93 | } 94 | }); 95 | // set default overlays 96 | var wantedOverlays = defaultOverlays; 97 | if (queryParams.hasOwnProperty('overlays')) { 98 | wantedOverlays = queryParams['overlays'].split(','); 99 | } 100 | wantedOverlays.forEach(function(layerID) { 101 | // get layer name 102 | var wantedName = getLayerNameByID(layerID); 103 | if (wantedName != '') { 104 | initialLayers.push(overlays[wantedName]); 105 | activeLayers.push(wantedName); 106 | } 107 | }); 108 | 109 | // set lat, lon, zoom 110 | if (queryParams.hasOwnProperty('zoom') && !isNaN(queryParams['zoom'])) { 111 | startZoom = queryParams['zoom']; 112 | } 113 | if (queryParams.hasOwnProperty('lat') && !isNaN(queryParams['lat']) && queryParams.hasOwnProperty('lon') && !isNaN(queryParams['lon'])) { 114 | startLatitude = queryParams['lat']; 115 | startLongitude = queryParams['lon']; 116 | } 117 | } 118 | 119 | parseUrl(); 120 | var mymap = L.map('mapid', { 121 | center: [startLatitude, startLongitude], 122 | zoom: startZoom, 123 | layers: initialLayers, 124 | attributionControl: false 125 | }); 126 | var layerControl = L.control.layers(baseLayers, overlays); 127 | var attributionControl = L.control.attribution(); 128 | attributionControl.addTo(mymap); 129 | layerControl.addTo(mymap); 130 | 131 | 132 | function updateAttribution() { 133 | attributionControl.remove(); 134 | attributionControl = L.control.attribution(); 135 | attributionControl.addAttribution('Basiskarte © OpenStreetMap contributors (ODbL), Kartengrafik CC-BY-SA') 136 | if (activeLayers.indexOf('OpenRailwayMap Infrastruktur') != -1) { 137 | attributionControl.addAttribution('Streckennetz: CC-BY-SA OpenStreetMap und OpenRailwayMap'); 138 | } 139 | if (activeLayers.indexOf('Störungen') != -1 || activeLayers.indexOf('behobene Störungen') != -1 || activeLayers.indexOf('Störungen') != -1) { 140 | attributionControl.addAttribution('Störungen: DB Netz'); 141 | } 142 | attributionControl.addTo(mymap); 143 | } 144 | 145 | updateAttribution(); 146 | 147 | 148 | 149 | function escapeHTML(input) { 150 | return input.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """).replace(/'/g, "'"); 151 | } 152 | 153 | // functions executed if the layer is changed or the map moved 154 | function updateUrl(newBaseLayerName, overlayIDs) { 155 | if (newBaseLayerName == '') { 156 | newBaseLayerName = 'OSM Carto'; 157 | } 158 | var origin = location.origin; 159 | var pathname = location.pathname; 160 | var newurl = origin + pathname + '#overlays=' + overlayIDs + '&zoom=' + mymap.getZoom() + '&lat=' + mymap.getCenter().lat.toFixed(6) + '&lon=' + mymap.getCenter().lng.toFixed(6); 161 | history.replaceState('', document.title, newurl); 162 | } 163 | 164 | function currentBerlinTime() { 165 | var currentTime = new Date(); 166 | var utcTime = {year : currentTime.getUTCFullYear(), month : currentTime.getUTCMonth(), day : currentTime.getUTCDate(), hour : currentTime.getUTCHours(), minute : currentTime.getUTCMinutes()}; 167 | var m = moment.tz(utcTime, 'UTC'); 168 | return m.tz("Europe/Berlin"); 169 | } 170 | 171 | function formatHimDate(date, time) { 172 | var m = moment(date + '_' + time, 'YYYYMMDD_HHmmss'); 173 | return m.format('DD.MM.YYYY HH:mm'); 174 | } 175 | 176 | function setPopupStateOpen() { 177 | popupOpen = true; 178 | } 179 | function setPopupStateClosed() { 180 | popupOpen = false; 181 | } 182 | 183 | function showTrainsForHandler(ev) { 184 | var xhr = new XMLHttpRequest(); 185 | var url = "/bin/mgate.exe"; 186 | xhr.open("POST", url, true); 187 | xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); 188 | xhr.responseType = "json"; 189 | var oldElement = document.querySelector('[data-himid="' + ev.target.dataset.himid + '"]'); 190 | var newElement = document.createElement('p'); 191 | xhr.onreadystatechange = function() { 192 | if(xhr.readyState == XMLHttpRequest.DONE && xhr.status == 200) { 193 | var trainList = []; 194 | console.log(xhr.response); 195 | var trainDataList = xhr.response['svcResL'][0]['res']['common']['himL'][0]['affJnyL']; 196 | trainDataList.forEach(function(e){ 197 | var parts = e['jid'].split('#'); 198 | trainList.push(escapeHTML(parts[30] + ' (' + parts[26] + ' ' + parts[28] + ')')); 199 | }); 200 | newElement.innerHTML = 'Betroffene Züge:
' + trainList.join('
'); 201 | oldElement.parentNode.replaceChild(newElement, oldElement); 202 | } 203 | } 204 | queryData = '{"ver":"1.15","lang":"deu","auth":{"type":"AID","aid":"hf7mcf9bv3nv8g5f"},"client":{"id":"DBZUGRADARNETZ","type":"WEB","name":"webapp","v":"0.1.0"},"formatted":false,"svcReqL":[{"meth":"HimDetails","req":{"input":"' + ev.target.dataset.himid + '","getTrains":true}'; 205 | queryData = queryData + ',"cfg":{"cfgGrpL":[],"cfgHash":"i74dckao7PmBwS0rbk0p"}}],"ext":"DBNETZZUGRADAR.2"}'; 206 | xhr.send(queryData); 207 | } 208 | 209 | function registerShowTrains() { 210 | var popups = document.getElementsByClassName('show-trains'); 211 | for (var i = 0; i < popups.length; ++i) { 212 | popups[i].addEventListener('click', showTrainsForHandler); 213 | }; 214 | } 215 | 216 | 217 | function addMarker(markerLat, markerLon, message, spatialContext, endOfEvent, localEvent, himId) { 218 | var nowTime = currentBerlinTime(); 219 | var historic = false; 220 | if (endOfEvent.isBefore(nowTime)) { 221 | historic = true; 222 | } 223 | var markerIcon = new DisruptionIcon({iconUrl: 'images/marker-red.svg'}); 224 | if (historic == true && localEvent) { 225 | markerIcon = new DisruptionIcon({iconUrl: 'images/marker-grey.svg'}); 226 | } else if (!historic && !localEvent) { 227 | markerIcon = new RegionMessageIcon({iconUrl: 'images/region-red.svg'}); 228 | } else if (historic && !localEvent) { 229 | markerIcon = new RegionMessageIcon({iconUrl: 'images/region-grey.svg'}); 230 | } 231 | var marker = L.marker([markerLat, markerLon], {icon: markerIcon}); 232 | marker.bindPopup('
' + escapeHTML(spatialContext) + '
' + message + '
Betroffene Züge anzeigen'); 233 | marker.on('popupopen', function(){setPopupStateOpen(); registerShowTrains();}); 234 | marker.on('popupclose', setPopupStateClosed); 235 | if (localEvent && historic) { 236 | oldMarkers.addLayer(marker); 237 | } else if (localEvent && !historic) { 238 | markers.addLayer(marker); 239 | } else { 240 | regionMarkers.addLayer(marker); 241 | } 242 | } 243 | 244 | L.Control.InfoIcon = L.Control.extend({ 245 | onAdd: function(map) { 246 | var info = L.DomUtil.create('img'); 247 | //L.DomUtil.addClass('leaflet-control-layers'); 248 | info.src = 'images/info.svg'; 249 | info.style.width = '36px'; 250 | info.style.height= '36px'; 251 | info.setAttribute('id', 'info'); 252 | info.addEventListener('click', showMessageOfTheDay); 253 | return info; 254 | }, 255 | 256 | onRemove: function(map) { 257 | // Nothing to do here 258 | } 259 | }); 260 | 261 | function closeMessageOfTheDay() { 262 | document.getElementById('motd_overlay').style.display = 'none'; 263 | document.getElementById('mapid').style.display = 'block'; 264 | document.body.style.position = 'fixed'; 265 | seenMotD = true; 266 | L.control.InfoIcon = function(opts) { 267 | return new L.Control.InfoIcon(opts); 268 | } 269 | L.control.InfoIcon({ position: 'topright' }).addTo(mymap); 270 | console.log('added topright'); 271 | } 272 | 273 | function showMessageOfTheDay() { 274 | var infoIcon = L.DomUtil.get('info'); 275 | if (infoIcon != null) { 276 | L.DomUtil.remove(infoIcon); 277 | } 278 | //infoIcon.remove(); 279 | //info.style.visibility = 'hidden'; 280 | document.getElementById('motd_text').innerHTML = '
' + motDInnerHTML.join('
') + '
'; 281 | document.getElementById('motd_overlay').style.display = 'block'; 282 | document.getElementById('motd_overlay').addEventListener('click', function(event){event.stopPropagation();}); 283 | document.getElementById('motd_overlay').addEventListener('mousedown', function(event){event.stopPropagation();}); 284 | document.getElementById('motd_overlay').addEventListener('mouseup', function(event){event.stopPropagation();}); 285 | document.getElementById('motd_overlay').addEventListener('dblclick', function(event){event.stopPropagation();}); 286 | document.getElementById('mapid').style.display = 'none'; 287 | document.body.style.position = 'static'; 288 | } 289 | 290 | 291 | document.getElementById('close_icon').addEventListener('click', closeMessageOfTheDay); 292 | 293 | function findAndMakeLinks(text) { 294 | var regexp = new RegExp('(https?://[^ ]+[^ .,])') 295 | return text.replace(regexp, '$1'); 296 | } 297 | 298 | function displayMarkers(responseFromServer) { 299 | // remove all existing markers 300 | markers.clearLayers(); 301 | oldMarkers.clearLayers(); 302 | regionMarkers.clearLayers(); 303 | 304 | var responseData = responseFromServer.svcResL[0].res.common; 305 | if (!("himL" in responseFromServer.svcResL[0].res.common)) { 306 | // there are no disruptions 307 | return; 308 | } 309 | var allHimL = responseFromServer.svcResL[0].res.common.himL; 310 | var allEdges = responseFromServer.svcResL[0].res.common.himMsgEdgeL; 311 | var allEvents = responseFromServer.svcResL[0].res.common.himMsgEventL; 312 | var allLocations = responseFromServer.svcResL[0].res.common.locL; 313 | var allRegions = responseData['himMsgRegionL']; 314 | var addMarkersToMap = function(element, index) { 315 | if (element.cat != 0) { 316 | // only unplanned disruptions 317 | return; 318 | } 319 | if (!element.hasOwnProperty('head') && !element.hasOwnProperty('text')) { 320 | // A message without a category for a reason and a detailed description is strange. 321 | // This happens if a large disruption is over. Skip it. 322 | return; 323 | } 324 | //TODO support different impacts for different traffic classes 325 | var himId = element.hid || null; 326 | var message = '' + escapeHTML(element.impactL[0].impact || '') + '
' + escapeHTML(element.head || '') + '
'; 327 | // add time 328 | var lastDurationString = ''; 329 | var lastEndOfEvent; 330 | for (var i = 0; i < element.eventRefL.length; i++) { 331 | var thisEvent = allEvents[element.eventRefL[i]]; 332 | lastEndOfEvent = moment.tz(thisEvent.tDate + thisEvent.tTime, 'YYYYMMDDHHmmss', 'Europe/Berlin'); 333 | var durationString = formatHimDate(thisEvent.fDate, thisEvent.fTime) + ' bis vsl. ' + formatHimDate(thisEvent.tDate, thisEvent.tTime); 334 | if (lastDurationString != durationString) { 335 | message = message + '
' + durationString; 336 | lastDurationString = durationString; 337 | } 338 | } 339 | if (element.hasOwnProperty('pubChL')) { 340 | var pubChL = element.pubChL[0]; 341 | message = message + '
zuletzt aktualisiert: ' + formatHimDate(pubChL.fDate, pubChL.fTime); 342 | } 343 | if (element.hasOwnProperty('text')) { 344 | message = message + '
' + findAndMakeLinks(element.text); 345 | } 346 | if (element.hasOwnProperty('prio') && element.prio == 1) { 347 | motDInnerHTML.push(message); 348 | if (!seenMotD) { 349 | showMessageOfTheDay(); 350 | } 351 | return; 352 | } 353 | var markerLat, markerLon; 354 | var addMarkerAndLine = function(edgeRef) { 355 | var thisEdge = allEdges[edgeRef]; 356 | markerLat = thisEdge.icoCrd.y / haconFactor; 357 | markerLon = thisEdge.icoCrd.x / haconFactor; 358 | // add location 359 | var fromLoc = thisEdge.fLocX; 360 | var toLoc = thisEdge.tLocX; 361 | var spatialContext = allLocations[fromLoc].name; 362 | if (typeof(toLoc) != undefined && fromLoc != toLoc) { 363 | spatialContext = spatialContext + '–' + allLocations[toLoc].name; 364 | } 365 | addMarker(markerLat, markerLon, message, spatialContext, lastEndOfEvent, true, himId); 366 | } 367 | if (element.hasOwnProperty('edgeRefL')) { 368 | element.edgeRefL.forEach(addMarkerAndLine); 369 | } else if (element.hasOwnProperty('regionRefL') && element.regionRefL.length > 0) { 370 | markerLat = allRegions[element.regionRefL[0]].icoCrd.y / haconFactor; 371 | markerLon = allRegions[element.regionRefL[0]].icoCrd.x / haconFactor; 372 | var spatialContext = allRegions[element.regionRefL[0]].name; 373 | addMarker(markerLat, markerLon, message, spatialContext, lastEndOfEvent, false, himId); 374 | } else { 375 | return; 376 | } 377 | } 378 | motDInnerHTML = []; 379 | allHimL.forEach(addMarkersToMap); 380 | showLoading(false); 381 | } 382 | 383 | function himDate(inputTime, offsetHours) { 384 | return inputTime.format("YYYYMMDD") 385 | } 386 | 387 | function himTime(inputTime, offsetHours) { 388 | return inputTime.format('HH') + '0000'; } 389 | 390 | function leafletBoundsToHacon(bounds) { 391 | var haconBounds = {'rect': { 'llCrd': {}, 'urCrd': {}}}; 392 | haconBounds.rect.llCrd.x = bounds.getWest() * haconFactor; 393 | haconBounds.rect.llCrd.y = bounds.getSouth() * haconFactor; 394 | haconBounds.rect.urCrd.x = bounds.getEast() * haconFactor; 395 | haconBounds.rect.urCrd.y = bounds.getNorth() * haconFactor; 396 | return haconBounds; 397 | } 398 | 399 | function showLoading(turnOn) { 400 | var loading = document.getElementById('loading'); 401 | if (turnOn) { 402 | loading.style.visibility = 'visible'; 403 | } else { 404 | loading.style.visibility = 'hidden'; 405 | } 406 | } 407 | 408 | /** 409 | * Fetch disruption data (HimGeoPos request) from the API. 410 | */ 411 | function getDisruptionData() { 412 | if (popupOpen == true) { 413 | // Don't reload the markers if any popup is open. 414 | return; 415 | } 416 | showLoading(true); 417 | var xhr = new XMLHttpRequest(); 418 | var url = "/bin/mgate.exe"; 419 | xhr.open("POST", url, true); 420 | xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); 421 | xhr.responseType = "json"; 422 | xhr.onreadystatechange = function() { 423 | if(xhr.readyState == XMLHttpRequest.DONE && xhr.status == 200) { 424 | displayMarkers(xhr.response); 425 | showLoading(false); 426 | } 427 | } 428 | // get current time 429 | var berlinTime = currentBerlinTime(); 430 | var dateB = himDate(berlinTime, 0); 431 | var timeB = himTime(berlinTime, 0); 432 | berlinTime.add(6, 'hours'); 433 | var dateE = himDate(berlinTime, 6); 434 | var timeE = himTime(berlinTime, 6); 435 | var bounds = mymap.getBounds(); 436 | queryData = '{"ver":"1.15","lang":"deu","auth":{"type":"AID","aid":"hf7mcf9bv3nv8g5f"},"client":{"id":"DBZUGRADARNETZ","type":"WEB","name":"webapp","v":"0.1.0"},"formatted":false,"svcReqL":[{"meth":"HimGeoPos","req":{"prio":100,"maxNum":5000,"getPolyLine":true,'; 437 | queryData = queryData + '"rect":' + JSON.stringify(leafletBoundsToHacon(bounds).rect) + ','; 438 | queryData = queryData + '"dateB":"' + dateB + '","timeB":"' + timeB + '","dateE":"' + dateE + '","timeE":"' + timeE; 439 | queryData = queryData + '","onlyHimId":false,"himFltrL":[{"type":"HIMCAT","mode":"INC","value":"0"}'; 440 | queryData = queryData + ',{"type":"PROD","mode":"INC","value":1023}]}'; 441 | queryData = queryData + ',"cfg":{"cfgGrpL":[],"cfgHash":"i74dckao7PmBwS0rbk0p"}}],"ext":"DBNETZZUGRADAR.2"}'; 442 | xhr.send(queryData); 443 | } 444 | 445 | function getCurrentOverlays() { 446 | var overlaysIDs = []; 447 | activeLayers.forEach(function(layerName){ 448 | overlaysIDs.push(overlaysMeta[layerName]); 449 | }); 450 | return overlaysIDs.toString(); 451 | } 452 | 453 | // change URL in address bar if the map is moved 454 | mymap.on('moveend', function(e) { 455 | updateUrl('', getCurrentOverlays()); 456 | getDisruptionData(); 457 | }); 458 | 459 | // change URL in address bar an overlay is removed 460 | mymap.on('overlayremove', function(e) { 461 | // remove from activeLayers 462 | activeLayers.splice(activeLayers.indexOf(e.name), 1); 463 | // update URL 464 | updateUrl('', getCurrentOverlays()); 465 | updateAttribution(); 466 | }); 467 | 468 | mymap.on('overlayadd', function(e) { 469 | // add to activeLayers 470 | activeLayers.push(e.name); 471 | updateUrl('', getCurrentOverlays()); 472 | updateAttribution(); 473 | }); 474 | 475 | getDisruptionData(); 476 | -------------------------------------------------------------------------------- /webapp/LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | 676 | -------------------------------------------------------------------------------- /webapp/moment-timezone-with-data-2012-2022.js: -------------------------------------------------------------------------------- 1 | //! moment-timezone.js 2 | //! version : 0.5.13 3 | //! Copyright (c) JS Foundation and other contributors 4 | //! license : MIT 5 | //! github.com/moment/moment-timezone 6 | 7 | (function (root, factory) { 8 | "use strict"; 9 | 10 | /*global define*/ 11 | if (typeof define === 'function' && define.amd) { 12 | define(['moment'], factory); // AMD 13 | } else if (typeof module === 'object' && module.exports) { 14 | module.exports = factory(require('moment')); // Node 15 | } else { 16 | factory(root.moment); // Browser 17 | } 18 | }(this, function (moment) { 19 | "use strict"; 20 | 21 | // Do not load moment-timezone a second time. 22 | // if (moment.tz !== undefined) { 23 | // logError('Moment Timezone ' + moment.tz.version + ' was already loaded ' + (moment.tz.dataVersion ? 'with data from ' : 'without any data') + moment.tz.dataVersion); 24 | // return moment; 25 | // } 26 | 27 | var VERSION = "0.5.13", 28 | zones = {}, 29 | links = {}, 30 | names = {}, 31 | guesses = {}, 32 | cachedGuess, 33 | 34 | momentVersion = moment.version.split('.'), 35 | major = +momentVersion[0], 36 | minor = +momentVersion[1]; 37 | 38 | // Moment.js version check 39 | if (major < 2 || (major === 2 && minor < 6)) { 40 | logError('Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js ' + moment.version + '. See momentjs.com'); 41 | } 42 | 43 | /************************************ 44 | Unpacking 45 | ************************************/ 46 | 47 | function charCodeToInt(charCode) { 48 | if (charCode > 96) { 49 | return charCode - 87; 50 | } else if (charCode > 64) { 51 | return charCode - 29; 52 | } 53 | return charCode - 48; 54 | } 55 | 56 | function unpackBase60(string) { 57 | var i = 0, 58 | parts = string.split('.'), 59 | whole = parts[0], 60 | fractional = parts[1] || '', 61 | multiplier = 1, 62 | num, 63 | out = 0, 64 | sign = 1; 65 | 66 | // handle negative numbers 67 | if (string.charCodeAt(0) === 45) { 68 | i = 1; 69 | sign = -1; 70 | } 71 | 72 | // handle digits before the decimal 73 | for (i; i < whole.length; i++) { 74 | num = charCodeToInt(whole.charCodeAt(i)); 75 | out = 60 * out + num; 76 | } 77 | 78 | // handle digits after the decimal 79 | for (i = 0; i < fractional.length; i++) { 80 | multiplier = multiplier / 60; 81 | num = charCodeToInt(fractional.charCodeAt(i)); 82 | out += num * multiplier; 83 | } 84 | 85 | return out * sign; 86 | } 87 | 88 | function arrayToInt (array) { 89 | for (var i = 0; i < array.length; i++) { 90 | array[i] = unpackBase60(array[i]); 91 | } 92 | } 93 | 94 | function intToUntil (array, length) { 95 | for (var i = 0; i < length; i++) { 96 | array[i] = Math.round((array[i - 1] || 0) + (array[i] * 60000)); // minutes to milliseconds 97 | } 98 | 99 | array[length - 1] = Infinity; 100 | } 101 | 102 | function mapIndices (source, indices) { 103 | var out = [], i; 104 | 105 | for (i = 0; i < indices.length; i++) { 106 | out[i] = source[indices[i]]; 107 | } 108 | 109 | return out; 110 | } 111 | 112 | function unpack (string) { 113 | var data = string.split('|'), 114 | offsets = data[2].split(' '), 115 | indices = data[3].split(''), 116 | untils = data[4].split(' '); 117 | 118 | arrayToInt(offsets); 119 | arrayToInt(indices); 120 | arrayToInt(untils); 121 | 122 | intToUntil(untils, indices.length); 123 | 124 | return { 125 | name : data[0], 126 | abbrs : mapIndices(data[1].split(' '), indices), 127 | offsets : mapIndices(offsets, indices), 128 | untils : untils, 129 | population : data[5] | 0 130 | }; 131 | } 132 | 133 | /************************************ 134 | Zone object 135 | ************************************/ 136 | 137 | function Zone (packedString) { 138 | if (packedString) { 139 | this._set(unpack(packedString)); 140 | } 141 | } 142 | 143 | Zone.prototype = { 144 | _set : function (unpacked) { 145 | this.name = unpacked.name; 146 | this.abbrs = unpacked.abbrs; 147 | this.untils = unpacked.untils; 148 | this.offsets = unpacked.offsets; 149 | this.population = unpacked.population; 150 | }, 151 | 152 | _index : function (timestamp) { 153 | var target = +timestamp, 154 | untils = this.untils, 155 | i; 156 | 157 | for (i = 0; i < untils.length; i++) { 158 | if (target < untils[i]) { 159 | return i; 160 | } 161 | } 162 | }, 163 | 164 | parse : function (timestamp) { 165 | var target = +timestamp, 166 | offsets = this.offsets, 167 | untils = this.untils, 168 | max = untils.length - 1, 169 | offset, offsetNext, offsetPrev, i; 170 | 171 | for (i = 0; i < max; i++) { 172 | offset = offsets[i]; 173 | offsetNext = offsets[i + 1]; 174 | offsetPrev = offsets[i ? i - 1 : i]; 175 | 176 | if (offset < offsetNext && tz.moveAmbiguousForward) { 177 | offset = offsetNext; 178 | } else if (offset > offsetPrev && tz.moveInvalidForward) { 179 | offset = offsetPrev; 180 | } 181 | 182 | if (target < untils[i] - (offset * 60000)) { 183 | return offsets[i]; 184 | } 185 | } 186 | 187 | return offsets[max]; 188 | }, 189 | 190 | abbr : function (mom) { 191 | return this.abbrs[this._index(mom)]; 192 | }, 193 | 194 | offset : function (mom) { 195 | return this.offsets[this._index(mom)]; 196 | } 197 | }; 198 | 199 | /************************************ 200 | Current Timezone 201 | ************************************/ 202 | 203 | function OffsetAt(at) { 204 | var timeString = at.toTimeString(); 205 | var abbr = timeString.match(/\([a-z ]+\)/i); 206 | if (abbr && abbr[0]) { 207 | // 17:56:31 GMT-0600 (CST) 208 | // 17:56:31 GMT-0600 (Central Standard Time) 209 | abbr = abbr[0].match(/[A-Z]/g); 210 | abbr = abbr ? abbr.join('') : undefined; 211 | } else { 212 | // 17:56:31 CST 213 | // 17:56:31 GMT+0800 (台北標準時間) 214 | abbr = timeString.match(/[A-Z]{3,5}/g); 215 | abbr = abbr ? abbr[0] : undefined; 216 | } 217 | 218 | if (abbr === 'GMT') { 219 | abbr = undefined; 220 | } 221 | 222 | this.at = +at; 223 | this.abbr = abbr; 224 | this.offset = at.getTimezoneOffset(); 225 | } 226 | 227 | function ZoneScore(zone) { 228 | this.zone = zone; 229 | this.offsetScore = 0; 230 | this.abbrScore = 0; 231 | } 232 | 233 | ZoneScore.prototype.scoreOffsetAt = function (offsetAt) { 234 | this.offsetScore += Math.abs(this.zone.offset(offsetAt.at) - offsetAt.offset); 235 | if (this.zone.abbr(offsetAt.at).replace(/[^A-Z]/g, '') !== offsetAt.abbr) { 236 | this.abbrScore++; 237 | } 238 | }; 239 | 240 | function findChange(low, high) { 241 | var mid, diff; 242 | 243 | while ((diff = ((high.at - low.at) / 12e4 | 0) * 6e4)) { 244 | mid = new OffsetAt(new Date(low.at + diff)); 245 | if (mid.offset === low.offset) { 246 | low = mid; 247 | } else { 248 | high = mid; 249 | } 250 | } 251 | 252 | return low; 253 | } 254 | 255 | function userOffsets() { 256 | var startYear = new Date().getFullYear() - 2, 257 | last = new OffsetAt(new Date(startYear, 0, 1)), 258 | offsets = [last], 259 | change, next, i; 260 | 261 | for (i = 1; i < 48; i++) { 262 | next = new OffsetAt(new Date(startYear, i, 1)); 263 | if (next.offset !== last.offset) { 264 | change = findChange(last, next); 265 | offsets.push(change); 266 | offsets.push(new OffsetAt(new Date(change.at + 6e4))); 267 | } 268 | last = next; 269 | } 270 | 271 | for (i = 0; i < 4; i++) { 272 | offsets.push(new OffsetAt(new Date(startYear + i, 0, 1))); 273 | offsets.push(new OffsetAt(new Date(startYear + i, 6, 1))); 274 | } 275 | 276 | return offsets; 277 | } 278 | 279 | function sortZoneScores (a, b) { 280 | if (a.offsetScore !== b.offsetScore) { 281 | return a.offsetScore - b.offsetScore; 282 | } 283 | if (a.abbrScore !== b.abbrScore) { 284 | return a.abbrScore - b.abbrScore; 285 | } 286 | return b.zone.population - a.zone.population; 287 | } 288 | 289 | function addToGuesses (name, offsets) { 290 | var i, offset; 291 | arrayToInt(offsets); 292 | for (i = 0; i < offsets.length; i++) { 293 | offset = offsets[i]; 294 | guesses[offset] = guesses[offset] || {}; 295 | guesses[offset][name] = true; 296 | } 297 | } 298 | 299 | function guessesForUserOffsets (offsets) { 300 | var offsetsLength = offsets.length, 301 | filteredGuesses = {}, 302 | out = [], 303 | i, j, guessesOffset; 304 | 305 | for (i = 0; i < offsetsLength; i++) { 306 | guessesOffset = guesses[offsets[i].offset] || {}; 307 | for (j in guessesOffset) { 308 | if (guessesOffset.hasOwnProperty(j)) { 309 | filteredGuesses[j] = true; 310 | } 311 | } 312 | } 313 | 314 | for (i in filteredGuesses) { 315 | if (filteredGuesses.hasOwnProperty(i)) { 316 | out.push(names[i]); 317 | } 318 | } 319 | 320 | return out; 321 | } 322 | 323 | function rebuildGuess () { 324 | 325 | // use Intl API when available and returning valid time zone 326 | try { 327 | var intlName = Intl.DateTimeFormat().resolvedOptions().timeZone; 328 | if (intlName){ 329 | var name = names[normalizeName(intlName)]; 330 | if (name) { 331 | return name; 332 | } 333 | logError("Moment Timezone found " + intlName + " from the Intl api, but did not have that data loaded."); 334 | } 335 | } catch (e) { 336 | // Intl unavailable, fall back to manual guessing. 337 | } 338 | 339 | var offsets = userOffsets(), 340 | offsetsLength = offsets.length, 341 | guesses = guessesForUserOffsets(offsets), 342 | zoneScores = [], 343 | zoneScore, i, j; 344 | 345 | for (i = 0; i < guesses.length; i++) { 346 | zoneScore = new ZoneScore(getZone(guesses[i]), offsetsLength); 347 | for (j = 0; j < offsetsLength; j++) { 348 | zoneScore.scoreOffsetAt(offsets[j]); 349 | } 350 | zoneScores.push(zoneScore); 351 | } 352 | 353 | zoneScores.sort(sortZoneScores); 354 | 355 | return zoneScores.length > 0 ? zoneScores[0].zone.name : undefined; 356 | } 357 | 358 | function guess (ignoreCache) { 359 | if (!cachedGuess || ignoreCache) { 360 | cachedGuess = rebuildGuess(); 361 | } 362 | return cachedGuess; 363 | } 364 | 365 | /************************************ 366 | Global Methods 367 | ************************************/ 368 | 369 | function normalizeName (name) { 370 | return (name || '').toLowerCase().replace(/\//g, '_'); 371 | } 372 | 373 | function addZone (packed) { 374 | var i, name, split, normalized; 375 | 376 | if (typeof packed === "string") { 377 | packed = [packed]; 378 | } 379 | 380 | for (i = 0; i < packed.length; i++) { 381 | split = packed[i].split('|'); 382 | name = split[0]; 383 | normalized = normalizeName(name); 384 | zones[normalized] = packed[i]; 385 | names[normalized] = name; 386 | if (split[5]) { 387 | addToGuesses(normalized, split[2].split(' ')); 388 | } 389 | } 390 | } 391 | 392 | function getZone (name, caller) { 393 | name = normalizeName(name); 394 | 395 | var zone = zones[name]; 396 | var link; 397 | 398 | if (zone instanceof Zone) { 399 | return zone; 400 | } 401 | 402 | if (typeof zone === 'string') { 403 | zone = new Zone(zone); 404 | zones[name] = zone; 405 | return zone; 406 | } 407 | 408 | // Pass getZone to prevent recursion more than 1 level deep 409 | if (links[name] && caller !== getZone && (link = getZone(links[name], getZone))) { 410 | zone = zones[name] = new Zone(); 411 | zone._set(link); 412 | zone.name = names[name]; 413 | return zone; 414 | } 415 | 416 | return null; 417 | } 418 | 419 | function getNames () { 420 | var i, out = []; 421 | 422 | for (i in names) { 423 | if (names.hasOwnProperty(i) && (zones[i] || zones[links[i]]) && names[i]) { 424 | out.push(names[i]); 425 | } 426 | } 427 | 428 | return out.sort(); 429 | } 430 | 431 | function addLink (aliases) { 432 | var i, alias, normal0, normal1; 433 | 434 | if (typeof aliases === "string") { 435 | aliases = [aliases]; 436 | } 437 | 438 | for (i = 0; i < aliases.length; i++) { 439 | alias = aliases[i].split('|'); 440 | 441 | normal0 = normalizeName(alias[0]); 442 | normal1 = normalizeName(alias[1]); 443 | 444 | links[normal0] = normal1; 445 | names[normal0] = alias[0]; 446 | 447 | links[normal1] = normal0; 448 | names[normal1] = alias[1]; 449 | } 450 | } 451 | 452 | function loadData (data) { 453 | addZone(data.zones); 454 | addLink(data.links); 455 | tz.dataVersion = data.version; 456 | } 457 | 458 | function zoneExists (name) { 459 | if (!zoneExists.didShowError) { 460 | zoneExists.didShowError = true; 461 | logError("moment.tz.zoneExists('" + name + "') has been deprecated in favor of !moment.tz.zone('" + name + "')"); 462 | } 463 | return !!getZone(name); 464 | } 465 | 466 | function needsOffset (m) { 467 | return !!(m._a && (m._tzm === undefined)); 468 | } 469 | 470 | function logError (message) { 471 | if (typeof console !== 'undefined' && typeof console.error === 'function') { 472 | console.error(message); 473 | } 474 | } 475 | 476 | /************************************ 477 | moment.tz namespace 478 | ************************************/ 479 | 480 | function tz (input) { 481 | var args = Array.prototype.slice.call(arguments, 0, -1), 482 | name = arguments[arguments.length - 1], 483 | zone = getZone(name), 484 | out = moment.utc.apply(null, args); 485 | 486 | if (zone && !moment.isMoment(input) && needsOffset(out)) { 487 | out.add(zone.parse(out), 'minutes'); 488 | } 489 | 490 | out.tz(name); 491 | 492 | return out; 493 | } 494 | 495 | tz.version = VERSION; 496 | tz.dataVersion = ''; 497 | tz._zones = zones; 498 | tz._links = links; 499 | tz._names = names; 500 | tz.add = addZone; 501 | tz.link = addLink; 502 | tz.load = loadData; 503 | tz.zone = getZone; 504 | tz.zoneExists = zoneExists; // deprecated in 0.1.0 505 | tz.guess = guess; 506 | tz.names = getNames; 507 | tz.Zone = Zone; 508 | tz.unpack = unpack; 509 | tz.unpackBase60 = unpackBase60; 510 | tz.needsOffset = needsOffset; 511 | tz.moveInvalidForward = true; 512 | tz.moveAmbiguousForward = false; 513 | 514 | /************************************ 515 | Interface with Moment.js 516 | ************************************/ 517 | 518 | var fn = moment.fn; 519 | 520 | moment.tz = tz; 521 | 522 | moment.defaultZone = null; 523 | 524 | moment.updateOffset = function (mom, keepTime) { 525 | var zone = moment.defaultZone, 526 | offset; 527 | 528 | if (mom._z === undefined) { 529 | if (zone && needsOffset(mom) && !mom._isUTC) { 530 | mom._d = moment.utc(mom._a)._d; 531 | mom.utc().add(zone.parse(mom), 'minutes'); 532 | } 533 | mom._z = zone; 534 | } 535 | if (mom._z) { 536 | offset = mom._z.offset(mom); 537 | if (Math.abs(offset) < 16) { 538 | offset = offset / 60; 539 | } 540 | if (mom.utcOffset !== undefined) { 541 | mom.utcOffset(-offset, keepTime); 542 | } else { 543 | mom.zone(offset, keepTime); 544 | } 545 | } 546 | }; 547 | 548 | fn.tz = function (name) { 549 | if (name) { 550 | this._z = getZone(name); 551 | if (this._z) { 552 | moment.updateOffset(this); 553 | } else { 554 | logError("Moment Timezone has no data for " + name + ". See http://momentjs.com/timezone/docs/#/data-loading/."); 555 | } 556 | return this; 557 | } 558 | if (this._z) { return this._z.name; } 559 | }; 560 | 561 | function abbrWrap (old) { 562 | return function () { 563 | if (this._z) { return this._z.abbr(this); } 564 | return old.call(this); 565 | }; 566 | } 567 | 568 | function resetZoneWrap (old) { 569 | return function () { 570 | this._z = null; 571 | return old.apply(this, arguments); 572 | }; 573 | } 574 | 575 | fn.zoneName = abbrWrap(fn.zoneName); 576 | fn.zoneAbbr = abbrWrap(fn.zoneAbbr); 577 | fn.utc = resetZoneWrap(fn.utc); 578 | 579 | moment.tz.setDefault = function(name) { 580 | if (major < 2 || (major === 2 && minor < 9)) { 581 | logError('Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js ' + moment.version + '.'); 582 | } 583 | moment.defaultZone = name ? getZone(name) : null; 584 | return moment; 585 | }; 586 | 587 | // Cloning a moment should include the _z property. 588 | var momentProperties = moment.momentProperties; 589 | if (Object.prototype.toString.call(momentProperties) === '[object Array]') { 590 | // moment 2.8.1+ 591 | momentProperties.push('_z'); 592 | momentProperties.push('_a'); 593 | } else if (momentProperties) { 594 | // moment 2.7.0 595 | momentProperties._z = null; 596 | } 597 | 598 | loadData({ 599 | "version": "2017b", 600 | "zones": [ 601 | "Africa/Abidjan|GMT|0|0||48e5", 602 | "Africa/Khartoum|EAT|-30|0||51e5", 603 | "Africa/Algiers|CET|-10|0||26e5", 604 | "Africa/Lagos|WAT|-10|0||17e6", 605 | "Africa/Maputo|CAT|-20|0||26e5", 606 | "Africa/Cairo|EET EEST|-20 -30|01010|1M2m0 gL0 e10 mn0|15e6", 607 | "Africa/Casablanca|WET WEST|0 -10|0101010101010101010101010101010101010101010|1H3C0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 Rc0 11A0 e00 e00 U00 11A0 8o0 e00 11A0 11A0 5A0 e00 17c0 1fA0 1a00|32e5", 608 | "Europe/Paris|CET CEST|-10 -20|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|11e6", 609 | "Africa/Johannesburg|SAST|-20|0||84e5", 610 | "Africa/Tripoli|EET CET CEST|-20 -10 -20|0120|1IlA0 TA0 1o00|11e5", 611 | "Africa/Windhoek|WAST WAT|-20 -10|01010101010101010101010|1GQo0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0|32e4", 612 | "America/Adak|HST HDT|a0 90|01010101010101010101010|1GIc0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|326", 613 | "America/Anchorage|AKST AKDT|90 80|01010101010101010101010|1GIb0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|30e4", 614 | "America/Santo_Domingo|AST|40|0||29e5", 615 | "America/Araguaina|-03 -02|30 20|010|1IdD0 Lz0|14e4", 616 | "America/Fortaleza|-03|30|0||34e5", 617 | "America/Asuncion|-03 -04|30 40|01010101010101010101010|1GTf0 1cN0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0|28e5", 618 | "America/Panama|EST|50|0||15e5", 619 | "America/Bahia|-02 -03|20 30|01|1GCq0|27e5", 620 | "America/Mexico_City|CST CDT|60 50|01010101010101010101010|1GQw0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|20e6", 621 | "America/Managua|CST|60|0||22e5", 622 | "America/La_Paz|-04|40|0||19e5", 623 | "America/Lima|-05|50|0||11e6", 624 | "America/Denver|MST MDT|70 60|01010101010101010101010|1GI90 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|26e5", 625 | "America/Campo_Grande|-03 -04|30 40|01010101010101010101010|1GCr0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1C10 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0|77e4", 626 | "America/Cancun|CST CDT EST|60 50 50|01010102|1GQw0 1nX0 14p0 1lb0 14p0 1lb0 Dd0|63e4", 627 | "America/Caracas|-0430 -04|4u 40|01|1QMT0|29e5", 628 | "America/Chicago|CST CDT|60 50|01010101010101010101010|1GI80 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|92e5", 629 | "America/Chihuahua|MST MDT|70 60|01010101010101010101010|1GQx0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|81e4", 630 | "America/Phoenix|MST|70|0||42e5", 631 | "America/Los_Angeles|PST PDT|80 70|01010101010101010101010|1GIa0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|15e6", 632 | "America/New_York|EST EDT|50 40|01010101010101010101010|1GI70 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|21e6", 633 | "America/Rio_Branco|-04 -05|40 50|01|1KLE0|31e4", 634 | "America/Fort_Nelson|PST PDT MST|80 70 70|01010102|1GIa0 1zb0 Op0 1zb0 Op0 1zb0 Op0|39e2", 635 | "America/Halifax|AST ADT|40 30|01010101010101010101010|1GI60 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|39e4", 636 | "America/Godthab|-03 -02|30 20|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|17e3", 637 | "America/Grand_Turk|EST EDT AST|50 40 40|010101012|1GI70 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|37e2", 638 | "America/Havana|CST CDT|50 40|01010101010101010101010|1GQt0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0|21e5", 639 | "America/Metlakatla|PST AKST AKDT|80 90 80|0121212121212121|1PAa0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|14e2", 640 | "America/Miquelon|-03 -02|30 20|01010101010101010101010|1GI50 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|61e2", 641 | "America/Montevideo|-02 -03|20 30|01010101|1GI40 1o10 11z0 1o10 11z0 1o10 11z0|17e5", 642 | "America/Noronha|-02|20|0||30e2", 643 | "America/Port-au-Prince|EST EDT|50 40|010101010101010101010|1GI70 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 3iN0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|23e5", 644 | "Antarctica/Palmer|-03 -04|30 40|010101010|1H3D0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0|40", 645 | "America/Santiago|-03 -04|30 40|010101010101010101010|1H3D0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Dd0 1Nb0 Ap0|62e5", 646 | "America/Sao_Paulo|-02 -03|20 30|01010101010101010101010|1GCq0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1C10 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0|20e6", 647 | "Atlantic/Azores|-01 +00|10 0|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|25e4", 648 | "America/St_Johns|NST NDT|3u 2u|01010101010101010101010|1GI5u 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|11e4", 649 | "Antarctica/Casey|+11 +08|-b0 -80|010|1GAF0 blz0|10", 650 | "Antarctica/Davis|+05 +07|-50 -70|01|1GAI0|70", 651 | "Pacific/Port_Moresby|+10|-a0|0||25e4", 652 | "Pacific/Guadalcanal|+11|-b0|0||11e4", 653 | "Asia/Tashkent|+05|-50|0||23e5", 654 | "Pacific/Auckland|NZDT NZST|-d0 -c0|01010101010101010101010|1GQe0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00|14e5", 655 | "Asia/Baghdad|+03|-30|0||66e5", 656 | "Antarctica/Troll|+00 +02|0 -20|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|40", 657 | "Asia/Dhaka|+06|-60|0||16e6", 658 | "Asia/Amman|EET EEST|-20 -30|010101010101010101010|1GPy0 4bX0 Dd0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00|25e5", 659 | "Asia/Kamchatka|+12|-c0|0||18e4", 660 | "Asia/Baku|+04 +05|-40 -50|010101010|1GNA0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00|27e5", 661 | "Asia/Bangkok|+07|-70|0||15e6", 662 | "Asia/Barnaul|+07 +06|-70 -60|010|1N7v0 3rd0", 663 | "Asia/Beirut|EET EEST|-20 -30|01010101010101010101010|1GNy0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0|22e5", 664 | "Asia/Manila|+08|-80|0||24e6", 665 | "Asia/Kolkata|IST|-5u|0||15e6", 666 | "Asia/Chita|+10 +08 +09|-a0 -80 -90|012|1N7s0 3re0|33e4", 667 | "Asia/Ulaanbaatar|+08 +09|-80 -90|01010|1O8G0 1cJ0 1cP0 1cJ0|12e5", 668 | "Asia/Shanghai|CST|-80|0||23e6", 669 | "Asia/Colombo|+0530|-5u|0||22e5", 670 | "Asia/Damascus|EET EEST|-20 -30|01010101010101010101010|1GPy0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0|26e5", 671 | "Asia/Dili|+09|-90|0||19e4", 672 | "Asia/Dubai|+04|-40|0||39e5", 673 | "Asia/Famagusta|EET EEST +03|-20 -30 -30|01010101012|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 15U0", 674 | "Asia/Gaza|EET EEST|-20 -30|01010101010101010101010|1GPy0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nz0 1220 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0|18e5", 675 | "Asia/Hong_Kong|HKT|-80|0||73e5", 676 | "Asia/Hovd|+07 +08|-70 -80|01010|1O8H0 1cJ0 1cP0 1cJ0|81e3", 677 | "Asia/Irkutsk|+09 +08|-90 -80|01|1N7t0|60e4", 678 | "Europe/Istanbul|EET EEST +03|-20 -30 -30|01010101012|1GNB0 1qM0 11A0 1o00 1200 1nA0 11A0 1tA0 U00 15w0|13e6", 679 | "Asia/Jakarta|WIB|-70|0||31e6", 680 | "Asia/Jayapura|WIT|-90|0||26e4", 681 | "Asia/Jerusalem|IST IDT|-20 -30|01010101010101010101010|1GPA0 1aL0 1eN0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0|81e4", 682 | "Asia/Kabul|+0430|-4u|0||46e5", 683 | "Asia/Karachi|PKT|-50|0||24e6", 684 | "Asia/Kathmandu|+0545|-5J|0||12e5", 685 | "Asia/Yakutsk|+10 +09|-a0 -90|01|1N7s0|28e4", 686 | "Asia/Krasnoyarsk|+08 +07|-80 -70|01|1N7u0|10e5", 687 | "Asia/Magadan|+12 +10 +11|-c0 -a0 -b0|012|1N7q0 3Cq0|95e3", 688 | "Asia/Makassar|WITA|-80|0||15e5", 689 | "Europe/Athens|EET EEST|-20 -30|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|35e5", 690 | "Asia/Novosibirsk|+07 +06|-70 -60|010|1N7v0 4eN0|15e5", 691 | "Asia/Omsk|+07 +06|-70 -60|01|1N7v0|12e5", 692 | "Asia/Pyongyang|KST KST|-90 -8u|01|1P4D0|29e5", 693 | "Asia/Rangoon|+0630|-6u|0||48e5", 694 | "Asia/Sakhalin|+11 +10|-b0 -a0|010|1N7r0 3rd0|58e4", 695 | "Asia/Seoul|KST|-90|0||23e6", 696 | "Asia/Srednekolymsk|+12 +11|-c0 -b0|01|1N7q0|35e2", 697 | "Asia/Tehran|+0330 +0430|-3u -4u|01010101010101010101010|1GLUu 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0|14e6", 698 | "Asia/Tokyo|JST|-90|0||38e6", 699 | "Asia/Tomsk|+07 +06|-70 -60|010|1N7v0 3Qp0|10e5", 700 | "Asia/Vladivostok|+11 +10|-b0 -a0|01|1N7r0|60e4", 701 | "Asia/Yekaterinburg|+06 +05|-60 -50|01|1N7w0|14e5", 702 | "Europe/Lisbon|WET WEST|0 -10|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|27e5", 703 | "Atlantic/Cape_Verde|-01|10|0||50e4", 704 | "Australia/Sydney|AEDT AEST|-b0 -a0|01010101010101010101010|1GQg0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0|40e5", 705 | "Australia/Adelaide|ACDT ACST|-au -9u|01010101010101010101010|1GQgu 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0|11e5", 706 | "Australia/Brisbane|AEST|-a0|0||20e5", 707 | "Australia/Darwin|ACST|-9u|0||12e4", 708 | "Australia/Eucla|+0845|-8J|0||368", 709 | "Australia/Lord_Howe|+11 +1030|-b0 -au|01010101010101010101010|1GQf0 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu|347", 710 | "Australia/Perth|AWST|-80|0||18e5", 711 | "Pacific/Easter|-05 -06|50 60|010101010101010101010|1H3D0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Dd0 1Nb0 Ap0|30e2", 712 | "Europe/Dublin|GMT IST|0 -10|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|12e5", 713 | "Pacific/Tahiti|-10|a0|0||18e4", 714 | "Pacific/Niue|-11|b0|0||12e2", 715 | "Etc/GMT+12|-12|c0|0|", 716 | "Pacific/Galapagos|-06|60|0||25e3", 717 | "Etc/GMT+7|-07|70|0|", 718 | "Pacific/Pitcairn|-08|80|0||56", 719 | "Pacific/Gambier|-09|90|0||125", 720 | "Etc/GMT-1|+01|-10|0|", 721 | "Pacific/Fakaofo|+13|-d0|0||483", 722 | "Pacific/Kiritimati|+14|-e0|0||51e2", 723 | "Etc/GMT-2|+02|-20|0|", 724 | "Etc/UCT|UCT|0|0|", 725 | "Etc/UTC|UTC|0|0|", 726 | "Europe/Astrakhan|+04 +03|-40 -30|010|1N7y0 3rd0", 727 | "Europe/London|GMT BST|0 -10|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|10e6", 728 | "Europe/Chisinau|EET EEST|-20 -30|01010101010101010101010|1GNA0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|67e4", 729 | "Europe/Kaliningrad|+03 EET|-30 -20|01|1N7z0|44e4", 730 | "Europe/Volgograd|+04 +03|-40 -30|01|1N7y0|10e5", 731 | "Europe/Moscow|MSK MSK|-40 -30|01|1N7y0|16e6", 732 | "Europe/Saratov|+04 +03|-40 -30|010|1N7y0 5810", 733 | "Europe/Simferopol|EET EEST MSK MSK|-20 -30 -40 -30|0101023|1GNB0 1qM0 11A0 1o00 11z0 1nW0|33e4", 734 | "Pacific/Honolulu|HST|a0|0||37e4", 735 | "MET|MET MEST|-10 -20|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0", 736 | "Pacific/Chatham|+1345 +1245|-dJ -cJ|01010101010101010101010|1GQe0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00|600", 737 | "Pacific/Apia|+14 +13|-e0 -d0|01010101010101010101010|1GQe0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00|37e3", 738 | "Pacific/Bougainville|+10 +11|-a0 -b0|01|1NwE0|18e4", 739 | "Pacific/Fiji|+13 +12|-d0 -c0|01010101010101010101010|1Goe0 1Nc0 Ao0 1Q00 xz0 1SN0 uM0 1SM0 uM0 1VA0 s00 1VA0 uM0 1SM0 uM0 1SM0 uM0 1SM0 uM0 1VA0 s00 1VA0|88e4", 740 | "Pacific/Guam|ChST|-a0|0||17e4", 741 | "Pacific/Marquesas|-0930|9u|0||86e2", 742 | "Pacific/Pago_Pago|SST|b0|0||37e2", 743 | "Pacific/Norfolk|+1130 +11|-bu -b0|01|1PoCu|25e4", 744 | "Pacific/Tongatapu|+13 +14|-d0 -e0|01010101010101|1S4d0 s00 1VA0 uM0 1SM0 uM0 1SM0 uM0 1SM0 uM0 1VA0 s00 1VA0|75e3" 745 | ], 746 | "links": [ 747 | "Africa/Abidjan|Africa/Accra", 748 | "Africa/Abidjan|Africa/Bamako", 749 | "Africa/Abidjan|Africa/Banjul", 750 | "Africa/Abidjan|Africa/Bissau", 751 | "Africa/Abidjan|Africa/Conakry", 752 | "Africa/Abidjan|Africa/Dakar", 753 | "Africa/Abidjan|Africa/Freetown", 754 | "Africa/Abidjan|Africa/Lome", 755 | "Africa/Abidjan|Africa/Monrovia", 756 | "Africa/Abidjan|Africa/Nouakchott", 757 | "Africa/Abidjan|Africa/Ouagadougou", 758 | "Africa/Abidjan|Africa/Sao_Tome", 759 | "Africa/Abidjan|Africa/Timbuktu", 760 | "Africa/Abidjan|America/Danmarkshavn", 761 | "Africa/Abidjan|Atlantic/Reykjavik", 762 | "Africa/Abidjan|Atlantic/St_Helena", 763 | "Africa/Abidjan|Etc/GMT", 764 | "Africa/Abidjan|Etc/GMT+0", 765 | "Africa/Abidjan|Etc/GMT-0", 766 | "Africa/Abidjan|Etc/GMT0", 767 | "Africa/Abidjan|Etc/Greenwich", 768 | "Africa/Abidjan|GMT", 769 | "Africa/Abidjan|GMT+0", 770 | "Africa/Abidjan|GMT-0", 771 | "Africa/Abidjan|GMT0", 772 | "Africa/Abidjan|Greenwich", 773 | "Africa/Abidjan|Iceland", 774 | "Africa/Algiers|Africa/Tunis", 775 | "Africa/Cairo|Egypt", 776 | "Africa/Casablanca|Africa/El_Aaiun", 777 | "Africa/Johannesburg|Africa/Maseru", 778 | "Africa/Johannesburg|Africa/Mbabane", 779 | "Africa/Khartoum|Africa/Addis_Ababa", 780 | "Africa/Khartoum|Africa/Asmara", 781 | "Africa/Khartoum|Africa/Asmera", 782 | "Africa/Khartoum|Africa/Dar_es_Salaam", 783 | "Africa/Khartoum|Africa/Djibouti", 784 | "Africa/Khartoum|Africa/Juba", 785 | "Africa/Khartoum|Africa/Kampala", 786 | "Africa/Khartoum|Africa/Mogadishu", 787 | "Africa/Khartoum|Africa/Nairobi", 788 | "Africa/Khartoum|Indian/Antananarivo", 789 | "Africa/Khartoum|Indian/Comoro", 790 | "Africa/Khartoum|Indian/Mayotte", 791 | "Africa/Lagos|Africa/Bangui", 792 | "Africa/Lagos|Africa/Brazzaville", 793 | "Africa/Lagos|Africa/Douala", 794 | "Africa/Lagos|Africa/Kinshasa", 795 | "Africa/Lagos|Africa/Libreville", 796 | "Africa/Lagos|Africa/Luanda", 797 | "Africa/Lagos|Africa/Malabo", 798 | "Africa/Lagos|Africa/Ndjamena", 799 | "Africa/Lagos|Africa/Niamey", 800 | "Africa/Lagos|Africa/Porto-Novo", 801 | "Africa/Maputo|Africa/Blantyre", 802 | "Africa/Maputo|Africa/Bujumbura", 803 | "Africa/Maputo|Africa/Gaborone", 804 | "Africa/Maputo|Africa/Harare", 805 | "Africa/Maputo|Africa/Kigali", 806 | "Africa/Maputo|Africa/Lubumbashi", 807 | "Africa/Maputo|Africa/Lusaka", 808 | "Africa/Tripoli|Libya", 809 | "America/Adak|America/Atka", 810 | "America/Adak|US/Aleutian", 811 | "America/Anchorage|America/Juneau", 812 | "America/Anchorage|America/Nome", 813 | "America/Anchorage|America/Sitka", 814 | "America/Anchorage|America/Yakutat", 815 | "America/Anchorage|US/Alaska", 816 | "America/Campo_Grande|America/Cuiaba", 817 | "America/Chicago|America/Indiana/Knox", 818 | "America/Chicago|America/Indiana/Tell_City", 819 | "America/Chicago|America/Knox_IN", 820 | "America/Chicago|America/Matamoros", 821 | "America/Chicago|America/Menominee", 822 | "America/Chicago|America/North_Dakota/Beulah", 823 | "America/Chicago|America/North_Dakota/Center", 824 | "America/Chicago|America/North_Dakota/New_Salem", 825 | "America/Chicago|America/Rainy_River", 826 | "America/Chicago|America/Rankin_Inlet", 827 | "America/Chicago|America/Resolute", 828 | "America/Chicago|America/Winnipeg", 829 | "America/Chicago|CST6CDT", 830 | "America/Chicago|Canada/Central", 831 | "America/Chicago|US/Central", 832 | "America/Chicago|US/Indiana-Starke", 833 | "America/Chihuahua|America/Mazatlan", 834 | "America/Chihuahua|Mexico/BajaSur", 835 | "America/Denver|America/Boise", 836 | "America/Denver|America/Cambridge_Bay", 837 | "America/Denver|America/Edmonton", 838 | "America/Denver|America/Inuvik", 839 | "America/Denver|America/Ojinaga", 840 | "America/Denver|America/Shiprock", 841 | "America/Denver|America/Yellowknife", 842 | "America/Denver|Canada/Mountain", 843 | "America/Denver|MST7MDT", 844 | "America/Denver|Navajo", 845 | "America/Denver|US/Mountain", 846 | "America/Fortaleza|America/Argentina/Buenos_Aires", 847 | "America/Fortaleza|America/Argentina/Catamarca", 848 | "America/Fortaleza|America/Argentina/ComodRivadavia", 849 | "America/Fortaleza|America/Argentina/Cordoba", 850 | "America/Fortaleza|America/Argentina/Jujuy", 851 | "America/Fortaleza|America/Argentina/La_Rioja", 852 | "America/Fortaleza|America/Argentina/Mendoza", 853 | "America/Fortaleza|America/Argentina/Rio_Gallegos", 854 | "America/Fortaleza|America/Argentina/Salta", 855 | "America/Fortaleza|America/Argentina/San_Juan", 856 | "America/Fortaleza|America/Argentina/San_Luis", 857 | "America/Fortaleza|America/Argentina/Tucuman", 858 | "America/Fortaleza|America/Argentina/Ushuaia", 859 | "America/Fortaleza|America/Belem", 860 | "America/Fortaleza|America/Buenos_Aires", 861 | "America/Fortaleza|America/Catamarca", 862 | "America/Fortaleza|America/Cayenne", 863 | "America/Fortaleza|America/Cordoba", 864 | "America/Fortaleza|America/Jujuy", 865 | "America/Fortaleza|America/Maceio", 866 | "America/Fortaleza|America/Mendoza", 867 | "America/Fortaleza|America/Paramaribo", 868 | "America/Fortaleza|America/Recife", 869 | "America/Fortaleza|America/Rosario", 870 | "America/Fortaleza|America/Santarem", 871 | "America/Fortaleza|Antarctica/Rothera", 872 | "America/Fortaleza|Atlantic/Stanley", 873 | "America/Fortaleza|Etc/GMT+3", 874 | "America/Halifax|America/Glace_Bay", 875 | "America/Halifax|America/Goose_Bay", 876 | "America/Halifax|America/Moncton", 877 | "America/Halifax|America/Thule", 878 | "America/Halifax|Atlantic/Bermuda", 879 | "America/Halifax|Canada/Atlantic", 880 | "America/Havana|Cuba", 881 | "America/La_Paz|America/Boa_Vista", 882 | "America/La_Paz|America/Guyana", 883 | "America/La_Paz|America/Manaus", 884 | "America/La_Paz|America/Porto_Velho", 885 | "America/La_Paz|Brazil/West", 886 | "America/La_Paz|Etc/GMT+4", 887 | "America/Lima|America/Bogota", 888 | "America/Lima|America/Guayaquil", 889 | "America/Lima|Etc/GMT+5", 890 | "America/Los_Angeles|America/Dawson", 891 | "America/Los_Angeles|America/Ensenada", 892 | "America/Los_Angeles|America/Santa_Isabel", 893 | "America/Los_Angeles|America/Tijuana", 894 | "America/Los_Angeles|America/Vancouver", 895 | "America/Los_Angeles|America/Whitehorse", 896 | "America/Los_Angeles|Canada/Pacific", 897 | "America/Los_Angeles|Canada/Yukon", 898 | "America/Los_Angeles|Mexico/BajaNorte", 899 | "America/Los_Angeles|PST8PDT", 900 | "America/Los_Angeles|US/Pacific", 901 | "America/Los_Angeles|US/Pacific-New", 902 | "America/Managua|America/Belize", 903 | "America/Managua|America/Costa_Rica", 904 | "America/Managua|America/El_Salvador", 905 | "America/Managua|America/Guatemala", 906 | "America/Managua|America/Regina", 907 | "America/Managua|America/Swift_Current", 908 | "America/Managua|America/Tegucigalpa", 909 | "America/Managua|Canada/East-Saskatchewan", 910 | "America/Managua|Canada/Saskatchewan", 911 | "America/Mexico_City|America/Bahia_Banderas", 912 | "America/Mexico_City|America/Merida", 913 | "America/Mexico_City|America/Monterrey", 914 | "America/Mexico_City|Mexico/General", 915 | "America/New_York|America/Detroit", 916 | "America/New_York|America/Fort_Wayne", 917 | "America/New_York|America/Indiana/Indianapolis", 918 | "America/New_York|America/Indiana/Marengo", 919 | "America/New_York|America/Indiana/Petersburg", 920 | "America/New_York|America/Indiana/Vevay", 921 | "America/New_York|America/Indiana/Vincennes", 922 | "America/New_York|America/Indiana/Winamac", 923 | "America/New_York|America/Indianapolis", 924 | "America/New_York|America/Iqaluit", 925 | "America/New_York|America/Kentucky/Louisville", 926 | "America/New_York|America/Kentucky/Monticello", 927 | "America/New_York|America/Louisville", 928 | "America/New_York|America/Montreal", 929 | "America/New_York|America/Nassau", 930 | "America/New_York|America/Nipigon", 931 | "America/New_York|America/Pangnirtung", 932 | "America/New_York|America/Thunder_Bay", 933 | "America/New_York|America/Toronto", 934 | "America/New_York|Canada/Eastern", 935 | "America/New_York|EST5EDT", 936 | "America/New_York|US/East-Indiana", 937 | "America/New_York|US/Eastern", 938 | "America/New_York|US/Michigan", 939 | "America/Noronha|Atlantic/South_Georgia", 940 | "America/Noronha|Brazil/DeNoronha", 941 | "America/Noronha|Etc/GMT+2", 942 | "America/Panama|America/Atikokan", 943 | "America/Panama|America/Cayman", 944 | "America/Panama|America/Coral_Harbour", 945 | "America/Panama|America/Jamaica", 946 | "America/Panama|EST", 947 | "America/Panama|Jamaica", 948 | "America/Phoenix|America/Creston", 949 | "America/Phoenix|America/Dawson_Creek", 950 | "America/Phoenix|America/Hermosillo", 951 | "America/Phoenix|MST", 952 | "America/Phoenix|US/Arizona", 953 | "America/Rio_Branco|America/Eirunepe", 954 | "America/Rio_Branco|America/Porto_Acre", 955 | "America/Rio_Branco|Brazil/Acre", 956 | "America/Santiago|Chile/Continental", 957 | "America/Santo_Domingo|America/Anguilla", 958 | "America/Santo_Domingo|America/Antigua", 959 | "America/Santo_Domingo|America/Aruba", 960 | "America/Santo_Domingo|America/Barbados", 961 | "America/Santo_Domingo|America/Blanc-Sablon", 962 | "America/Santo_Domingo|America/Curacao", 963 | "America/Santo_Domingo|America/Dominica", 964 | "America/Santo_Domingo|America/Grenada", 965 | "America/Santo_Domingo|America/Guadeloupe", 966 | "America/Santo_Domingo|America/Kralendijk", 967 | "America/Santo_Domingo|America/Lower_Princes", 968 | "America/Santo_Domingo|America/Marigot", 969 | "America/Santo_Domingo|America/Martinique", 970 | "America/Santo_Domingo|America/Montserrat", 971 | "America/Santo_Domingo|America/Port_of_Spain", 972 | "America/Santo_Domingo|America/Puerto_Rico", 973 | "America/Santo_Domingo|America/St_Barthelemy", 974 | "America/Santo_Domingo|America/St_Kitts", 975 | "America/Santo_Domingo|America/St_Lucia", 976 | "America/Santo_Domingo|America/St_Thomas", 977 | "America/Santo_Domingo|America/St_Vincent", 978 | "America/Santo_Domingo|America/Tortola", 979 | "America/Santo_Domingo|America/Virgin", 980 | "America/Sao_Paulo|Brazil/East", 981 | "America/St_Johns|Canada/Newfoundland", 982 | "Antarctica/Palmer|America/Punta_Arenas", 983 | "Asia/Baghdad|Antarctica/Syowa", 984 | "Asia/Baghdad|Asia/Aden", 985 | "Asia/Baghdad|Asia/Bahrain", 986 | "Asia/Baghdad|Asia/Kuwait", 987 | "Asia/Baghdad|Asia/Qatar", 988 | "Asia/Baghdad|Asia/Riyadh", 989 | "Asia/Baghdad|Etc/GMT-3", 990 | "Asia/Baghdad|Europe/Minsk", 991 | "Asia/Bangkok|Asia/Ho_Chi_Minh", 992 | "Asia/Bangkok|Asia/Novokuznetsk", 993 | "Asia/Bangkok|Asia/Phnom_Penh", 994 | "Asia/Bangkok|Asia/Saigon", 995 | "Asia/Bangkok|Asia/Vientiane", 996 | "Asia/Bangkok|Etc/GMT-7", 997 | "Asia/Bangkok|Indian/Christmas", 998 | "Asia/Dhaka|Antarctica/Vostok", 999 | "Asia/Dhaka|Asia/Almaty", 1000 | "Asia/Dhaka|Asia/Bishkek", 1001 | "Asia/Dhaka|Asia/Dacca", 1002 | "Asia/Dhaka|Asia/Kashgar", 1003 | "Asia/Dhaka|Asia/Qyzylorda", 1004 | "Asia/Dhaka|Asia/Thimbu", 1005 | "Asia/Dhaka|Asia/Thimphu", 1006 | "Asia/Dhaka|Asia/Urumqi", 1007 | "Asia/Dhaka|Etc/GMT-6", 1008 | "Asia/Dhaka|Indian/Chagos", 1009 | "Asia/Dili|Etc/GMT-9", 1010 | "Asia/Dili|Pacific/Palau", 1011 | "Asia/Dubai|Asia/Muscat", 1012 | "Asia/Dubai|Asia/Tbilisi", 1013 | "Asia/Dubai|Asia/Yerevan", 1014 | "Asia/Dubai|Etc/GMT-4", 1015 | "Asia/Dubai|Europe/Samara", 1016 | "Asia/Dubai|Indian/Mahe", 1017 | "Asia/Dubai|Indian/Mauritius", 1018 | "Asia/Dubai|Indian/Reunion", 1019 | "Asia/Gaza|Asia/Hebron", 1020 | "Asia/Hong_Kong|Hongkong", 1021 | "Asia/Jakarta|Asia/Pontianak", 1022 | "Asia/Jerusalem|Asia/Tel_Aviv", 1023 | "Asia/Jerusalem|Israel", 1024 | "Asia/Kamchatka|Asia/Anadyr", 1025 | "Asia/Kamchatka|Etc/GMT-12", 1026 | "Asia/Kamchatka|Kwajalein", 1027 | "Asia/Kamchatka|Pacific/Funafuti", 1028 | "Asia/Kamchatka|Pacific/Kwajalein", 1029 | "Asia/Kamchatka|Pacific/Majuro", 1030 | "Asia/Kamchatka|Pacific/Nauru", 1031 | "Asia/Kamchatka|Pacific/Tarawa", 1032 | "Asia/Kamchatka|Pacific/Wake", 1033 | "Asia/Kamchatka|Pacific/Wallis", 1034 | "Asia/Kathmandu|Asia/Katmandu", 1035 | "Asia/Kolkata|Asia/Calcutta", 1036 | "Asia/Makassar|Asia/Ujung_Pandang", 1037 | "Asia/Manila|Asia/Brunei", 1038 | "Asia/Manila|Asia/Kuala_Lumpur", 1039 | "Asia/Manila|Asia/Kuching", 1040 | "Asia/Manila|Asia/Singapore", 1041 | "Asia/Manila|Etc/GMT-8", 1042 | "Asia/Manila|Singapore", 1043 | "Asia/Rangoon|Asia/Yangon", 1044 | "Asia/Rangoon|Indian/Cocos", 1045 | "Asia/Seoul|ROK", 1046 | "Asia/Shanghai|Asia/Chongqing", 1047 | "Asia/Shanghai|Asia/Chungking", 1048 | "Asia/Shanghai|Asia/Harbin", 1049 | "Asia/Shanghai|Asia/Macao", 1050 | "Asia/Shanghai|Asia/Macau", 1051 | "Asia/Shanghai|Asia/Taipei", 1052 | "Asia/Shanghai|PRC", 1053 | "Asia/Shanghai|ROC", 1054 | "Asia/Tashkent|Antarctica/Mawson", 1055 | "Asia/Tashkent|Asia/Aqtau", 1056 | "Asia/Tashkent|Asia/Aqtobe", 1057 | "Asia/Tashkent|Asia/Ashgabat", 1058 | "Asia/Tashkent|Asia/Ashkhabad", 1059 | "Asia/Tashkent|Asia/Atyrau", 1060 | "Asia/Tashkent|Asia/Dushanbe", 1061 | "Asia/Tashkent|Asia/Oral", 1062 | "Asia/Tashkent|Asia/Samarkand", 1063 | "Asia/Tashkent|Etc/GMT-5", 1064 | "Asia/Tashkent|Indian/Kerguelen", 1065 | "Asia/Tashkent|Indian/Maldives", 1066 | "Asia/Tehran|Iran", 1067 | "Asia/Tokyo|Japan", 1068 | "Asia/Ulaanbaatar|Asia/Choibalsan", 1069 | "Asia/Ulaanbaatar|Asia/Ulan_Bator", 1070 | "Asia/Vladivostok|Asia/Ust-Nera", 1071 | "Asia/Yakutsk|Asia/Khandyga", 1072 | "Atlantic/Azores|America/Scoresbysund", 1073 | "Atlantic/Cape_Verde|Etc/GMT+1", 1074 | "Australia/Adelaide|Australia/Broken_Hill", 1075 | "Australia/Adelaide|Australia/South", 1076 | "Australia/Adelaide|Australia/Yancowinna", 1077 | "Australia/Brisbane|Australia/Lindeman", 1078 | "Australia/Brisbane|Australia/Queensland", 1079 | "Australia/Darwin|Australia/North", 1080 | "Australia/Lord_Howe|Australia/LHI", 1081 | "Australia/Perth|Australia/West", 1082 | "Australia/Sydney|Australia/ACT", 1083 | "Australia/Sydney|Australia/Canberra", 1084 | "Australia/Sydney|Australia/Currie", 1085 | "Australia/Sydney|Australia/Hobart", 1086 | "Australia/Sydney|Australia/Melbourne", 1087 | "Australia/Sydney|Australia/NSW", 1088 | "Australia/Sydney|Australia/Tasmania", 1089 | "Australia/Sydney|Australia/Victoria", 1090 | "Etc/UCT|UCT", 1091 | "Etc/UTC|Etc/Universal", 1092 | "Etc/UTC|Etc/Zulu", 1093 | "Etc/UTC|UTC", 1094 | "Etc/UTC|Universal", 1095 | "Etc/UTC|Zulu", 1096 | "Europe/Astrakhan|Europe/Ulyanovsk", 1097 | "Europe/Athens|Asia/Nicosia", 1098 | "Europe/Athens|EET", 1099 | "Europe/Athens|Europe/Bucharest", 1100 | "Europe/Athens|Europe/Helsinki", 1101 | "Europe/Athens|Europe/Kiev", 1102 | "Europe/Athens|Europe/Mariehamn", 1103 | "Europe/Athens|Europe/Nicosia", 1104 | "Europe/Athens|Europe/Riga", 1105 | "Europe/Athens|Europe/Sofia", 1106 | "Europe/Athens|Europe/Tallinn", 1107 | "Europe/Athens|Europe/Uzhgorod", 1108 | "Europe/Athens|Europe/Vilnius", 1109 | "Europe/Athens|Europe/Zaporozhye", 1110 | "Europe/Chisinau|Europe/Tiraspol", 1111 | "Europe/Dublin|Eire", 1112 | "Europe/Istanbul|Asia/Istanbul", 1113 | "Europe/Istanbul|Turkey", 1114 | "Europe/Lisbon|Atlantic/Canary", 1115 | "Europe/Lisbon|Atlantic/Faeroe", 1116 | "Europe/Lisbon|Atlantic/Faroe", 1117 | "Europe/Lisbon|Atlantic/Madeira", 1118 | "Europe/Lisbon|Portugal", 1119 | "Europe/Lisbon|WET", 1120 | "Europe/London|Europe/Belfast", 1121 | "Europe/London|Europe/Guernsey", 1122 | "Europe/London|Europe/Isle_of_Man", 1123 | "Europe/London|Europe/Jersey", 1124 | "Europe/London|GB", 1125 | "Europe/London|GB-Eire", 1126 | "Europe/Moscow|W-SU", 1127 | "Europe/Paris|Africa/Ceuta", 1128 | "Europe/Paris|Arctic/Longyearbyen", 1129 | "Europe/Paris|Atlantic/Jan_Mayen", 1130 | "Europe/Paris|CET", 1131 | "Europe/Paris|Europe/Amsterdam", 1132 | "Europe/Paris|Europe/Andorra", 1133 | "Europe/Paris|Europe/Belgrade", 1134 | "Europe/Paris|Europe/Berlin", 1135 | "Europe/Paris|Europe/Bratislava", 1136 | "Europe/Paris|Europe/Brussels", 1137 | "Europe/Paris|Europe/Budapest", 1138 | "Europe/Paris|Europe/Busingen", 1139 | "Europe/Paris|Europe/Copenhagen", 1140 | "Europe/Paris|Europe/Gibraltar", 1141 | "Europe/Paris|Europe/Ljubljana", 1142 | "Europe/Paris|Europe/Luxembourg", 1143 | "Europe/Paris|Europe/Madrid", 1144 | "Europe/Paris|Europe/Malta", 1145 | "Europe/Paris|Europe/Monaco", 1146 | "Europe/Paris|Europe/Oslo", 1147 | "Europe/Paris|Europe/Podgorica", 1148 | "Europe/Paris|Europe/Prague", 1149 | "Europe/Paris|Europe/Rome", 1150 | "Europe/Paris|Europe/San_Marino", 1151 | "Europe/Paris|Europe/Sarajevo", 1152 | "Europe/Paris|Europe/Skopje", 1153 | "Europe/Paris|Europe/Stockholm", 1154 | "Europe/Paris|Europe/Tirane", 1155 | "Europe/Paris|Europe/Vaduz", 1156 | "Europe/Paris|Europe/Vatican", 1157 | "Europe/Paris|Europe/Vienna", 1158 | "Europe/Paris|Europe/Warsaw", 1159 | "Europe/Paris|Europe/Zagreb", 1160 | "Europe/Paris|Europe/Zurich", 1161 | "Europe/Paris|Poland", 1162 | "Europe/Volgograd|Europe/Kirov", 1163 | "Pacific/Auckland|Antarctica/McMurdo", 1164 | "Pacific/Auckland|Antarctica/South_Pole", 1165 | "Pacific/Auckland|NZ", 1166 | "Pacific/Chatham|NZ-CHAT", 1167 | "Pacific/Easter|Chile/EasterIsland", 1168 | "Pacific/Fakaofo|Etc/GMT-13", 1169 | "Pacific/Fakaofo|Pacific/Enderbury", 1170 | "Pacific/Galapagos|Etc/GMT+6", 1171 | "Pacific/Gambier|Etc/GMT+9", 1172 | "Pacific/Guadalcanal|Antarctica/Macquarie", 1173 | "Pacific/Guadalcanal|Etc/GMT-11", 1174 | "Pacific/Guadalcanal|Pacific/Efate", 1175 | "Pacific/Guadalcanal|Pacific/Kosrae", 1176 | "Pacific/Guadalcanal|Pacific/Noumea", 1177 | "Pacific/Guadalcanal|Pacific/Pohnpei", 1178 | "Pacific/Guadalcanal|Pacific/Ponape", 1179 | "Pacific/Guam|Pacific/Saipan", 1180 | "Pacific/Honolulu|HST", 1181 | "Pacific/Honolulu|Pacific/Johnston", 1182 | "Pacific/Honolulu|US/Hawaii", 1183 | "Pacific/Kiritimati|Etc/GMT-14", 1184 | "Pacific/Niue|Etc/GMT+11", 1185 | "Pacific/Pago_Pago|Pacific/Midway", 1186 | "Pacific/Pago_Pago|Pacific/Samoa", 1187 | "Pacific/Pago_Pago|US/Samoa", 1188 | "Pacific/Pitcairn|Etc/GMT+8", 1189 | "Pacific/Port_Moresby|Antarctica/DumontDUrville", 1190 | "Pacific/Port_Moresby|Etc/GMT-10", 1191 | "Pacific/Port_Moresby|Pacific/Chuuk", 1192 | "Pacific/Port_Moresby|Pacific/Truk", 1193 | "Pacific/Port_Moresby|Pacific/Yap", 1194 | "Pacific/Tahiti|Etc/GMT+10", 1195 | "Pacific/Tahiti|Pacific/Rarotonga" 1196 | ] 1197 | }); 1198 | 1199 | 1200 | return moment; 1201 | })); 1202 | --------------------------------------------------------------------------------