Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(save): support custom timestamps on commit #1594

Merged
merged 2 commits into from
Dec 7, 2020
Merged

Conversation

b5
Copy link
Member

@b5 b5 commented Dec 7, 2020

This will let qri-git match timestamps from git on import.

setting the input dataset commit.Timestamp value will now be preserved instead of being overwritten with the current time. Input timestamp will ALWAYS be converted to UTC time zone.

This change makes it much easier to generate dataset histories with commit timestamps that aren't in chronological order, which is perfectly fine according to spec, but will cause bugs for any code that relies on such an assumption.

setting the input dataset commit.Timestamp value will now be preserved instead
of being overwritten with the current time. Input timestamp will ALWAYS be
converted to UTC time zone.

This change makes it much easier to generate dataset histories with commit
timestamps that aren't in chronological order, which is perfectly fine
according to spec, but will cause bugs for any code that relies on such an
assumption.
@b5 b5 added feat A code change that adds functionality base labels Dec 7, 2020
@b5 b5 self-assigned this Dec 7, 2020
@b5 b5 marked this pull request as ready for review December 7, 2020 15:59
@b5 b5 requested review from dustmop and Arqu December 7, 2020 16:00
Copy link
Contributor

@dustmop dustmop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

lib/peers.json Outdated
@@ -0,0 +1 @@
{"QmeL2mdVka1eahKENjehK6tBxkkpk5dNQ1qMcgWi7Hrb4B":{"id":"QmeL2mdVka1eahKENjehK6tBxkkpk5dNQ1qMcgWi7Hrb4B","peername":"default_profile_for_testing","created":"2020-12-07T09:41:29.273167-05:00","updated":"2020-12-07T09:41:29.273167-05:00","type":"peer","email":"","name":"","description":"","homeurl":"","color":"","thumb":"","photo":"","poster":"","twitter":""}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this file, and peers.json.lock as well

@b5 b5 merged commit 63c3d44 into master Dec 7, 2020
@b5 b5 deleted the feat_commit_time branch December 7, 2020 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
base feat A code change that adds functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants