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

Node.js World Time Integration

In serverless environments (like AWS Lambda or Vercel), the system clock is often set to UTC. Use our API to determine specific timezone offsets and DST rules on the fly for your Node.js backend.

NODE.JS
const axios = require('axios');

async function getServerTime() {
  try {
    const response = await axios.get('https://time.now/developer/api/timezone/America/Los_Angeles');
    const { datetime, utc_offset, dst } = response.data;
    
    console.log(`LA Time: ${datetime}`);
    console.log(`Offset: ${utc_offset}`);
    console.log(`DST Active: ${dst}`);
  } catch (error) {
    console.error('Time fetch failed:', error.message);
  }
}

getServerTime();

Pourquoi utiliser Time.Now pour Backend ?

  • Async/Await ready
  • JSON response parses automatically
  • High availability for microservices
Référence API Guide d'installation