Fix Python twt hash reference implementation #459

Merged
prologic merged 1 commits from lyse/yarn:spec into master 1 week ago
lyse commented 1 week ago
Collaborator

The spec says:

If the timestamp does not explicitly include any timezone information,
it must be assumed to be in UTC.

[…]
2020-12-13T07:45:23 → 2020-12-13T07:45:23Z

This commit addresses the UTC fallback. Previously, when no timezone was
present, the Zulu timezone was not used when calculating the twt hash,
producing a different twt hash.

In tt I have a test case verifying this equivalent but more verbose and commented implementation.

The spec says: > If the timestamp does not explicitly include any timezone information, > it must be assumed to be in UTC. > > […] > 2020-12-13T07:45:23 → 2020-12-13T07:45:23Z This commit addresses the UTC fallback. Previously, when no timezone was present, the Zulu timezone was not used when calculating the twt hash, producing a different twt hash. In [`tt`](https://git.isobeef.org/lyse/tt/) I have [a test case verifying](https://git.isobeef.org/lyse/tt/-/blob/master/test_twtxthash.py#L51) this [equivalent but more verbose and commented implementation](https://git.isobeef.org/lyse/tt/-/blob/master/twtxthash.py#L41).
lyse added 1 commit 1 week ago
ac899446b7 Fix Python twt hash reference implementation
prologic approved these changes 1 week ago
prologic merged commit b3cf32037f into master 1 week ago

Reviewers

prologic approved these changes 1 week ago
continuous-integration/drone/pr Build is passing
The pull request has been merged as b3cf32037f.
Sign in to join this conversation.
Loading…
There is no content yet.