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

417
Views
Firestore Timestamp toDate () devuelve una fecha UTC incorrecta?

Tengo las siguientes fechas almacenadas en mi Firestore Emulator v9.16.0 :

ingrese la descripción de la imagen aquí

Como puede ver en la captura de pantalla, cuando mi mouse se desplaza sobre EndDate , muestra la fecha UTC correcta, es decir, 2021-08-13T11:09:58.000Z , pero cuando emito el siguiente código, devuelve la fecha UTC incorrecta ( 2021-08-13T09:09:58.000Z ):

En mi servidor localhost Node.js:

 let maintConfigRef = db.collection("Configurations").doc("Maintenance"); let maintConfigDoc = await maintConfigRef.get(); if (maintConfigDoc.exists) { let maintConfigData = maintConfigDoc.data(); let endDate = maintConfigData.EndDate.toDate().toJSON(); // Returns 2021-08-13T09:09:58.000Z console.log(endDate); // Output "2021-08-13T09:09:58.000Z" };

Lo que significa que debería ser ...T11:09 (como se muestra en la información sobre herramientas) en lugar de ...T09:09 . ¿Alguien sabe qué tiene de malo y qué más debo hacer para hacerlo bien? ¡Gracias por adelantado!

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

No estoy seguro si fue un error, pero después de instalar firebase-tools 9.16.5 , el problema desapareció:

npm install -g firebase-tools

over 4 years ago · Santiago Trujillo Report
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!