Apoya a Time.now: Únete a nuestro Plan Premium ¡para una experiencia sin anuncios! Apóyanos: ¡Hazte Premium sin anuncios!
Backend Guía

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

¿Por qué usar Time.Now para Backend?

  • Async/Await ready
  • JSON response parses automatically
  • High availability for microservices
Referencia de la API Ver todas las guías