PostgreSQL
 SQL >> Database >  >> RDS >> PostgreSQL

Leggere valori timestamptz di PostgreSQL in Rust

Abilita la feature with-chrono-0_4 per il crate postgres di Rust, poi leggi la colonna come DateTime<Utc>.

use chrono::{DateTime, Utc}; use postgres::{Client, Error, NoTls}; let timestamp: DateTime<Utc> = row.get(1);