The Data Transfer Project makes it easy for platforms to build interoperable user data portability features. We are establishing a common framework, including data models and protocols, to enable direct transfer of data both into and out of participating online service providers.
this is fixing a single time-mishandling issue that uncovered two orthogonal problems:
"correct time" issue: json parsing dropped timezone/offset specifiers as we were using a hand-crafted formatter string. Switching us to a standard library one that accepts both Z alias (for greenwhich) and offsets (like +00:00). Gphotos api docs[a] (inlined into the code) shows we use the former, which is what the unit test uses as well.
this probably meant time metadata for content transferred was off by some number of due to timezone being dropped
"brittle unit test": unit test was relying on machine-specific gradle test behavior, so an out of the box git checkout master had two failing tests for me[b] but not for our github ci/cd.
this was due to use of toString() (in our assertEquals) which relies on your locale
fixed now as we use java.time.Instant#equals instead.
Time when the media item was first created (not when it was uploaded
to Google Photos).
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution
and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and
"2014-10-02T15:01:23.045123456Z".
[b]: local unit test failure looked like this for me (I'm in midwest US):
org.opentest4j.AssertionFailedError:
expected: <Mon Oct 02 22:33:38 UTC 2023>
but was: <Mon Oct 02 22:33:38 CDT 2023>
this is fixing a single time-mishandling issue that uncovered two orthogonal problems:
Z
alias (for greenwhich) and offsets (like+00:00
). Gphotos api docs[a] (inlined into the code) shows we use the former, which is what the unit test uses as well.gradle test
behavior, so an out of the boxgit checkout master
had two failing tests for me[b] but not for our github ci/cd.toString()
(in our assertEquals) which relies on your localejava.time.Instant#equals
instead.[a]: https://developers.google.com/photos/library/reference/rest/v1/mediaItems#mediametadata lists
creationTime
as:[b]: local unit test failure looked like this for me (I'm in midwest US):