Skip to content

Commit

Permalink
fix: timestamp in seconds, not millis
Browse files Browse the repository at this point in the history
  • Loading branch information
drahnr committed Apr 18, 2023
1 parent c1612d0 commit 044c1e2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/compat_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,12 @@ mod pgp {
.add_changelog_entry(
"me",
"was awesome, eh?",
chrono::Utc.timestamp_millis_opt(1681411811).unwrap(),
chrono::Utc.timestamp_opt(1681411811).unwrap(),
)
.add_changelog_entry(
"you",
"yeah, it was",
chrono::Utc.timestamp_millis_opt(1681411991).unwrap(),
chrono::Utc.timestamp_opt(1681411991).unwrap(),
)
.requires(Dependency::any("rpm-sign".to_string()))
.vendor("dummy vendor")
Expand Down Expand Up @@ -265,7 +265,7 @@ mod pgp {
.add_changelog_entry(
"you",
"yada yada",
chrono::Utc.timestamp_millis_opt(1681801261).unwrap(),
chrono::Utc.timestamp_opt(1681801261).unwrap(),
)
.requires(Dependency::any("rpm-sign".to_string()))
.build_and_sign(&signer)?;
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
//! .pre_install_script("echo preinst")
//! .build_time(std::time::SystemTime::now())
//! .build_host(gethostname::gethostname().to_str().unwrap().to_string())
//! .add_changelog_entry("me", "was awesome, eh?", chrono::Utc.timestamp_millis_opt(1681411811).unwrap())
//! .add_changelog_entry("me", "was awesome, eh?", chrono::Utc.timestamp_opt(1681411811).unwrap())
//! .add_changelog_entry("you", "yeah, it was", chrono::DateTime::parse_from_rfc3339("1996-12-19T16:39:57-08:00").unwrap())
//! .requires(rpm::Dependency::any("wget"))
//! .vendor("corporation or individual")
Expand Down
2 changes: 1 addition & 1 deletion src/tests/fut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ async fn test_rpm_builder_async() -> Result<(), Box<dyn std::error::Error>> {
.add_changelog_entry(
"you",
"yeah, it was",
chrono::Utc.timestamp_millis_opt(111223).unwrap(),
chrono::Utc.timestamp_opt(111223).unwrap(),
)
.requires(Dependency::any("wget"))
.vendor("dummy vendor")
Expand Down

0 comments on commit 044c1e2

Please sign in to comment.