chrono-tz-postgres

A timezone type that can be converted to and from a custom Postgres type.
This allows you to use typed timezones in PostgreSQL.
The custom Postgres enum tz is equivalent to the Rust enum chrono_tz::Tz. It can be found here.
chrono-tz-postgres in action
pub use chrono_tz::Tz;
use chrono_tz_postgres::TzPg;
use postgres::{Client, NoTls};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let tz = Tz::Arctic__Longyearbyen;
let tzpg: TzPg = tz.into();
let tz: Tz = tzpg.into();
serde_json::to_string(&tz)?;
let mut client = Client::connect("host=localhost user=postgres", NoTls)?;
let row = client.query_one("SELECT timezone FROM foo LIMIT 1", &[])?;
let tz: TzPg = row.get(0);
let tz: Tz = tz.into();
println!("{tz}");
Ok(())
}