Draft
Conversation
Co-authored-by: sourcefrog <346355+sourcefrog@users.noreply.github.com>
Co-authored-by: sourcefrog <346355+sourcefrog@users.noreply.github.com>
Co-authored-by: sourcefrog <346355+sourcefrog@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Convert from time library to jiff for improved clarity
Migrate from time to jiff for cleaner date/time handling
Feb 8, 2026
sourcefrog
reviewed
Feb 8, 2026
| } | ||
|
|
||
| #[allow(unused)] // really unused at present, but might be useful | ||
| pub(crate) trait ToOffsetDateTime { |
Owner
There was a problem hiding this comment.
@copilot maybe just delete this now, unless it's actually used?
Owner
There was a problem hiding this comment.
@copilot actually please see if more of this file can be reduced or deleted?
Author
There was a problem hiding this comment.
Simplified in commit 26345ae. Removed all three traits (ToTimestamp, ToFileTime, FromUnixAndNanos) and replaced with:
- Simple helper functions for the two needed conversions
- jiff's built-in
Timestamp::try_from(SystemTime)for SystemTime conversions
The file went from 79 lines to 18 lines.
… built-in conversions Co-authored-by: sourcefrog <346355+sourcefrog@users.noreply.github.com>
sourcefrog
reviewed
Feb 8, 2026
Co-authored-by: sourcefrog <346355+sourcefrog@users.noreply.github.com>
Co-authored-by: sourcefrog <346355+sourcefrog@users.noreply.github.com>
Copilot
AI
changed the title
Migrate from time to jiff for cleaner date/time handling
Add code formatting and pre-commit guidelines
Feb 8, 2026
Copilot stopped work on behalf of
sourcefrog due to an error
February 8, 2026 19:30
AGENTS.md will be in a separate PR focused on contributor guidelines. This PR should focus only on the jiff migration and code formatting.
Copilot
AI
changed the title
Add code formatting and pre-commit guidelines
Migrate from time to jiff library
Feb 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces
timecrate (v0.3) withjiff(v0.2.19) for cleaner time handling APIs and better timezone semantics.Key API Changes
Types:
OffsetDateTime→Timestamp(always UTC, no offset confusion)UtcOffset→TimeZoneMethods:
.unix_timestamp()→.as_second().nanosecond()→.subsec_nanosecond()OffsetDateTime::now_utc()→Timestamp::now()Benefits
TimeZone::system()vsUtcOffset::current_local_offset()Files Modified
src/unix_time.rs(simplified from 79 to 11 lines)src/{band,entry,change}.rs,src/index/entry.rs,src/source/entry.rssrc/transport/{local,sftp,s3}.rssrc/{show,bin/conserve,restore}.rstests/{old_archives,s3_integration}.rsAll modified files formatted with
cargo fmt(import ordering, line breaks).Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.