Soutenez Time.now : Rejoignez notre Plan Premium pour une expérience sans publicité ! Soutenez-nous : Passez Premium sans pub !
Backend Guide

Rust World Time Integration

Rust is built for safety and performance. When building CLI tools or backend services, you can use `reqwest` to fetch our API and `serde` to deserialize the time data into a type-safe Struct.

RUST
use serde::Deserialize;
    use reqwest::Error;

    #[derive(Deserialize, Debug)]
    struct TimeResponse {
        datetime: String,
        timezone: String,
        unixtime: i64,
    }

    #[tokio::main]
    async fn main() -> Result<(), Error> {
        let url = "https://time.now/developer/api/timezone/Asia/Tokyo";
        let res: TimeResponse = reqwest::get(url).await?.json().await?;

        println!("Time in {}: {}", res.timezone, res.datetime);
        Ok(())
    }

Pourquoi utiliser Time.Now pour Backend ?

  • Memory safe implementation
  • Strongly typed JSON
  • High performance
Référence API Guide d'installation