Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
I3csstatus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jiří Kalvoda
I3csstatus
Commits
7c97b1fe
Commit
7c97b1fe
authored
10 months ago
by
Jiří Kalvoda
Browse files
Options
Downloads
Patches
Plain Diff
FIF OBB next stop
parent
91bc1e15
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Parsers.cs
+4
-4
4 additions, 4 deletions
Parsers.cs
with
4 additions
and
4 deletions
Parsers.cs
+
4
−
4
View file @
7c97b1fe
...
...
@@ -413,10 +413,10 @@ class ParserOBBNextStop: Parser
try
{
JsonObject
json
=
JsonObject
.
Parse
(
data
).
AsObject
();
JsonObject
nextStop
=
json
[
"
curren
tStation"
].
AsObject
();
string
nextStopName
=
nextStop
[
"name"
].
AsObject
()[
"
all
"
].
GetValue
<
string
>();
DateTime
nextStopArrival
=
DateTime
.
Parse
(
nextStop
.
AsObject
()[
"arrival
F
orecast"
]?.
GetValue
<
string
>());
DateTime
nextStopArrivalScheudled
=
DateTime
.
Parse
(
nextStop
.
AsObject
()[
"arrival
S
chedule"
]?.
GetValue
<
string
>());
JsonObject
nextStop
=
json
[
"
nex
tStation"
].
AsObject
();
string
nextStopName
=
nextStop
[
"name"
].
AsObject
()[
"
de
"
].
GetValue
<
string
>();
DateTime
nextStopArrival
=
DateTime
.
Parse
(
nextStop
.
AsObject
()[
"arrival
"
].
AsObject
()[
"f
orecast"
]?.
GetValue
<
string
>());
DateTime
nextStopArrivalScheudled
=
DateTime
.
Parse
(
nextStop
.
AsObject
()[
"arrival
"
].
AsObject
()[
"s
chedule
d
"
]?.
GetValue
<
string
>());
long
arrivalIn
=
(
long
)(
nextStopArrival
-
DateTime
.
Now
).
TotalSeconds
;
int
delay_s
=
(
int
)(
nextStopArrival
-
nextStopArrivalScheudled
).
TotalSeconds
;
string
delayStr
=
delay_s
==
0
?
""
:
$" (
{
TimeShow
.
WithSign
(
delay_s
)}
)"
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment