Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comparison error for overnight arrivals. #30

Open
Ybbet opened this issue Aug 26, 2018 · 0 comments
Open

Comparison error for overnight arrivals. #30

Ybbet opened this issue Aug 26, 2018 · 0 comments

Comments

@Ybbet
Copy link

Ybbet commented Aug 26, 2018

First of all, thank you for this module! I use it a lot on my installation.

I noticed, that said, a bug on the next trains leaving after midnight.
Indeed, the script compares the departure time with respect to now. But do not take into account if it's in the future. As a result, it displays "X minutes ago".

Example: It is 22h. The train service is over for today. As a result, the next train is at 5am the next day. Instead of displaying "In 7h", it displays "17h ago".

It may be necessary to make a comparison of the departure date with the current time at this line of the script: https://github.com/CFenner/MMM-LocalTransport/blob/master/MMM-LocalTransport.js# L86

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant