Skip to content

Comparison error for overnight arrivals. #30

@Ybbet

Description

@Ybbet

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions