Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ publish = false

[dependencies]
ammonia = "4.2.4"
jiff = { version = "0.2.38", default-features = false, features = [
jiff = { version = "1.0.1", default-features = false, features = [
"std",
"tzdb-bundle-always",
] }
Expand Down
2 changes: 1 addition & 1 deletion src/feeds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ fn content_html(event: &Event) -> String {

/// `t` in RFC 2822 form with a `+0000` offset, as RSS requires.
fn rfc2822(t: Timestamp) -> String {
jiff::fmt::rfc2822::to_string(&t.to_zoned(TimeZone::UTC))
jiff::fmt::rfc2822::to_string(&t.to_zoned_datetime(TimeZone::UTC))
.expect("every Timestamp in UTC is representable in RFC 2822")
}

Expand Down
2 changes: 1 addition & 1 deletion src/ical.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ fn vevent(out: &mut String, base_url: &str, event: &Event, changed: Timestamp) {
///
/// UTC times need no `VTIMEZONE` block, and every client converts them to its own zone.
fn utc(t: Timestamp) -> String {
t.to_zoned(TimeZone::UTC)
t.to_zoned_datetime(TimeZone::UTC)
.strftime("%Y%m%dT%H%M%SZ")
.to_string()
}
Expand Down
6 changes: 3 additions & 3 deletions src/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use std::path::PathBuf;

use jiff::{Timestamp, Zoned, tz::TimeZone};
use jiff::{Timestamp, ZonedDateTime, tz::TimeZone};
use leptos::prelude::*;

use crate::{
Expand Down Expand Up @@ -499,11 +499,11 @@ pub fn place(location: &Location) -> String {
}

/// `t` in the display time zone.
fn local(t: Timestamp) -> Zoned {
fn local(t: Timestamp) -> ZonedDateTime {
// The tzdb is bundled into the binary (jiff `tzdb-bundle-always`), so this can't fail at
// runtime on any host.
let zone = TimeZone::get(ZONE).expect("bundled tzdb includes America/Los_Angeles");
t.to_zoned(zone)
t.to_zoned_datetime(zone)
}

/// `t` as an RFC 3339 string with the local offset, for `<time datetime>`.
Expand Down