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

279
Vistas
How to update Firestore Timestamp to a future value

We have a check-in and check-out component in our web app that simply uses firebase timestamps. However, we need the ability to edit those timestamps in the event someone makes a mistake.

checkInTimeStamp: fb.firestore.FieldValue.serverTimestamp("17:00") simply returns the current time.

Instead of 17:00, what object do we need to pass through the function to get the correct timestamp?

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

0

The serverTimestamp() generates current timestamp on server side. You can use a Date object instead to store a future date:

const futureDate = new Date();

// update date to future time
futureDate.setDate(futureDate.getDate() + 5);

db.document('col/doc').set({ checkInTimeStamp: futureDate })

Checkout other method like setDate() in MDN docs.

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