Skip to content

GTFS-RT > TimeZone issue for late/early text issue #123

Closed

Description

@mmathieum

The time is right but the early/late diff in minute is X hours too much

Seen with https://github.com/mtransitapps/fr-perpignan-sankeo-bus-android in ET. (6 hours = 360 minutes timezone diff)

Can reproduce on latest Store releases but not on latest master debug builds. 🤔

Image

Activity

  1. added theissue type on Apr 22, 2026
  2. added
    P3
    on Apr 22, 2026
  3. self-assigned this
    on Apr 22, 2026
  4. mmathieum commented on Apr 26, 2026

    @mmathieum
    MemberAuthor

    Happened again with ca-edmonton-ets-bus-android as well.
    Could only reproduce in release build type for a while and then it disappear before finding the root of the issue 🤔

  5. mmathieum commented on Apr 26, 2026

    @mmathieum
    MemberAuthor

    Found the bug!

    Agency time zone ID was right only the 1st time because the TimeZone.getDefault().id was always cached instead of the agency time zone 🤯

    @JvmStatic
    fun getRDSAgencyTimeZoneId(context: Context): String =
    _timeZone ?: context.getString(R.string.gtfs_rts_timezone) // do not change to avoid breaking compat w/ old modules
    .takeIf { it.isNotBlank() }
    ?: TimeZone.getDefault().id // TODO support for bike_station
    .also { _timeZone = it }

    -> so it only affect users checking out GTFS-RT data for transit agencies in different time-zone than their device

  6. linked a pull request that will close this issueGTFS-RT > fix time-zone issue... #127on Apr 26, 2026
  7. added
    P2
    and removed
    P3
    on Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2bug

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions