parse timestamps as utc, format in locale "de"

This commit is contained in:
Nils Schneider 2015-03-21 20:10:46 +01:00
parent 3b1deb9c43
commit f70f4938ab
2 changed files with 5 additions and 3 deletions

View File

@ -188,7 +188,7 @@
<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/1.5.2/css/ionicons.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/chroma-js/0.6.3/chroma.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment-with-locales.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.min.js"></script>
<script src="history.js"></script>

View File

@ -30,6 +30,8 @@ function getJSON(url) {
function main() {
getJSON("config.json").then( function (config) {
moment.locale("de")
var options = { worldCopyJump: true,
zoomControl: false
}
@ -101,8 +103,8 @@ function handle_data(config, map) {
})
nodes.forEach( function(node) {
node.firstseen = moment(node.firstseen)
node.lastseen = moment(node.lastseen)
node.firstseen = moment.utc(node.firstseen)
node.lastseen = moment.utc(node.lastseen)
})
var age = moment().subtract(14, 'days')