mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-22 22:59:35 +02:00
delays should be in seconds 🐛
This commit is contained in:
parent
ced7ed9a1b
commit
ee092d5282
1 changed files with 2 additions and 2 deletions
4
parse.js
4
parse.js
|
@ -95,7 +95,7 @@ const part = (tz, s, ln, r, c) => (pt) => {
|
|||
if (pt.dep.dTimeR && pt.dep.dTimeS) {
|
||||
const realtime = dateTime(tz, c.date, pt.dep.dTimeR)
|
||||
const planned = dateTime(tz, c.date, pt.dep.dTimeS)
|
||||
result.delay = realtime - planned
|
||||
result.delay = Math.round((realtime - planned) / 1000)
|
||||
}
|
||||
|
||||
if (pt.type === 'WALK') result.mode = 'walking'
|
||||
|
@ -154,7 +154,7 @@ const departure = (tz, s, ln, r) => (d) => {
|
|||
if (d.stbStop.dTimeR && d.stbStop.dTimeS) {
|
||||
const realtime = dateTime(tz, d.date, d.stbStop.dTimeR)
|
||||
const planned = dateTime(tz, d.date, d.stbStop.dTimeS)
|
||||
result.delay = realtime - planned
|
||||
result.delay = Math.round((realtime - planned) / 1000)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue