diff options
| author | vainsocial <vainsocial@prod> | 2017-08-12 15:04:53 +0000 |
|---|---|---|
| committer | vainsocial <vainsocial@prod> | 2017-08-12 15:04:53 +0000 |
| commit | 90e3351996c3021c8bca8994adbcea10f4832311 (patch) | |
| tree | ae2892c9369b6f0f000ac136702ee4eadf9b0922 | |
| parent | aef2d654e1cdee2c17559bed4867d9c4c7f090d8 (diff) | |
| download | telesucker-90e3351996c3021c8bca8994adbcea10f4832311.tar.gz telesucker-90e3351996c3021c8bca8994adbcea10f4832311.zip | |
fix time parsing for non-UTC datarelease/2.17.0
| -rw-r--r-- | worker.js | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -69,7 +69,7 @@ amqp.connect(RABBITMQ_URI).then(async (rabbit) => { // download const telemetry = await loggedRequest(url), spawn = telemetry.filter((ev) => ev.type == "PlayerFirstSpawn")[0], - spawn_time = moment.utc(spawn.time); + spawn_time = moment.parseZone(spawn.time); const forward_profiler = logger.startTimer(); @@ -77,10 +77,10 @@ amqp.connect(RABBITMQ_URI).then(async (rabbit) => { const gamePhase = (start, end) => { let spawn_plus_start = spawn_time.clone() .add(start, "seconds") - .format("YYYY-MM-DDTHH:mm:ss") + "+0000", + .format("YYYY-MM-DDTHH:mm:ss"), spawn_plus_end = spawn_time.clone() .add(end, "seconds") - .format("YYYY-MM-DDTHH:mm:ss") + "+0000"; + .format("YYYY-MM-DDTHH:mm:ss"); return { match_api_id: match_api_id, data: telemetry.slice( |
