summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorstuebinm2022-02-01 19:40:12 +0100
committerstuebinm2022-02-01 19:40:12 +0100
commitd6c0c640e64fceba6c280d76ee64d44831e9afef (patch)
tree199582ce5622c5a7593666a0e1799cdb68e96968 /src/main.rs
parent80a4af9f0a6f7e3bd2d8254f8bc8475ca73b8980 (diff)
handle (esp. iceportal) timestamps correctly
why use unix time if you can use unix time * 1000 while your margin of error will never be lower than a full minute?
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs
index cb9ac6c..6bac375 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -159,9 +159,9 @@ fn main() -> Result<(), ureq::Error> {
Command::ICEPortal => {
match get_request::<TripInfo>("https://iceportal.de/api1/rs/tripInfo/trip") {
Ok(resp) => {
- println!("{}: Currently in {}", traveltext, resp.get_train_ref());
- println!("guessing last stop was: {:?}", resp.guess_last_station());
- println!("{}", resp.trip())
+ println!("{}: Currently in {}\n", traveltext, resp.get_train_ref().to_string().green());
+ println!("guessing last stop was: {:?}\n", resp.guess_last_station());
+ println!("Stops:\n{}", resp.trip())
}
Err(err) => {
if cli.debug {