Skip to content

use UTC for timestamp in convertToDebianVersion #238

@dbyron0

Description

@dbyron0

As requested in #195 (comment), here's a separate request to change the the timestamp in convertToDebianVersion to UTC. You're right that there are consequences for people using timestamps from some other timezone when they switch to UTC, at least when that other timezone has a positive offset from UTC.

Consider two snapshots made one right after the other -- the first with the existing code, and the second with UTC.

For negative offsets (i.e. west of Greenwich), or no offset at all, dpkg --compare-versions works as expected: the second snapshot is considered newer than the first.

For positive offsets (i.e. east of Greenwich), the dpkg --compare-versions considers the second snapshot older than the first, so manual removal, or --force, etc. is required to get the second snapshot to install.

Another way of thinking about this: if the first UTC snapshot is at least as long after the last pre-UTC snapshot as the UTC offset (e.g. >= 2 hours between snapshots in UTC+2), there's no problem.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions