Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

158
Vistas
how to use moment js utc time to get a countries different timezone

I have the following populated list of timezones that a user can select example

{name: '(UTC-12:00) International Date Line West', offset: '-12:00:00'}
{name: '(UTC-11:00) Coordinated Universal Time-11', offset: '-11:00:00'}
{name: '(UTC-10:00) Aleutian Islands', offset: '-10:00:00'}
{name: '(UTC-06:00) Guadalajara, Mexico City, Monterrey', offset: '-06:00:00'}
{name: '(UTC-06:00) Saskatchewan', offset: '-06:00:00'}

when the user selects a timezone how do i get the actual time and date of the zone they selected?

i can get the following local time as follows

var today = Moment();
        this.date = today.format("dddd,D MMM YYYY");
this.times = Moment().format("HH:mm:ss");

But im not sure how to get the timezones of the different locations. so for example if they selected (UTC-12:00) International Date Line West how do i show the date and time of that location?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

  • Since your're using Moment.
  • you can use moment-timezone.js
  • Check docs here: https://momentjs.com/timezone/docs/

Example From Docs:

let moment = require('moment-timezone');
moment().tz("America/Los_Angeles").format();
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda