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(())
    }

Why use Time.Now for Backend?

  • Memory safe implementation
  • Strongly typed JSON
  • High performance
API Reference View All Guides

Free widgets for webmasters:

Free Analog Clock Widget | Free Digital Clock Widget | Free Text Clock Widget | Free Word Clock Widget | Free Countdown Widget