Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

383
Views
¿Por qué el método getUTCMinutes() muestra diferentes minutos para diferentes ubicaciones?

¿Por qué el método getUTCMinutes() muestra la hora incorrecta, diferentes minutos para diferentes ubicaciones? Obtengo datos de la API de Openweather y luego quiero mostrar la fecha y la hora locales para diferentes ciudades. Todo funciona bien, pero los minutos no son los mismos dependiendo de la ciudad que ingrese en mi aplicación, se muestra de manera diferente.

Ejemplo de código:

 const localMinutes = new Date((data.dt + data.timezone) * 1000).getUTCMinutes()

JSON:

 

{
 "coord": {
 "lon": 10.99,
 "lat": 44.34
 },
 "weather": [
 {
 "id": 501,
 "main": "Rain",
 "description": "moderate rain",
 "icon": "10d"
 }
 ],
 "base": "stations",
 "main": {
 "temp": 298.48,
 "feels_like": 298.74,
 "temp_min": 297.56,
 "temp_max": 300.05,
 "pressure": 1015,
 "humidity": 64,
 "sea_level": 1015,
 "grnd_level": 933
 },
 "visibility": 10000,
 "wind": {
 "speed": 0.62,
 "deg": 349,
 "gust": 1.18
 },
 "rain": {
 "1h": 3.16
 },
 "clouds": {
 "all": 100
 },
 "dt": 1661870592,
 "sys": {
 "type": 2,
 "id": 2075663,
 "country": "IT",
 "sunrise": 1661834187,
 "sunset": 1661882248
 },
 "timezone": 7200,
 "id": 3163858,
 "name": "Zocca",
 "cod": 200
} 

 
almost 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!