Tiempo/Números
Unix Timestamp ↔ Fecha
Convierte tiempo Unix a una fecha y viceversa, con soporte para cualquier zona horaria (IANA).
Unix time (epoch time) is the number of seconds elapsed since January 1, 1970, 00:00:00 UTC. It's the most common way to store time in databases, APIs, and logs, since it's just a single integer with no tie to a specific timezone or date format.
How to use it
- Timestamp → date: paste a number of seconds (or milliseconds) and the tool shows the date and time in your chosen timezone.
- Date → timestamp: pick a date and time to get the matching Unix timestamp.
- The "now" button fills in the current moment instantly — handy for testing an API or grabbing a fresh value.
Common uses
- Reading a created_at or expires_at field from an API response that arrived as a raw number.
- Checking whether a token or session has expired, given an expiry field in seconds since the epoch.
- Building a timestamp for test data or a date filter in a database query.
Things to keep in mind
Mixing up seconds and milliseconds is the most common mistake: JavaScript's Date.now() returns milliseconds, while most Unix APIs use seconds — a factor of 1000 off.
Unix time itself has no timezone — it's always UTC; a timezone is only applied when displaying the date to a person.
Artículo sobre esta herramienta: Tiempo Unix: por qué las computadoras cuentan el tiempo desde 1970
Preguntas frecuentes
¿Qué es una marca de tiempo Unix?
Es el número de segundos que han pasado desde el 1 de enero de 1970, 00:00:00 UTC (la época Unix). Este número no está vinculado a ninguna zona horaria — la zona horaria solo se aplica al mostrar la fecha a una persona.
¿Cuál es la diferencia entre segundos y milisegundos?
JavaScript y algunas API (como Date.now()) devuelven una marca de tiempo en milisegundos, mientras que el tiempo Unix clásico está en segundos. Confundir la unidad da una fecha en 1970 o en algún punto del futuro lejano — elige la unidad correcta en el campo "Unidades".
¿Qué es el problema del año 2038?
En sistemas donde una marca de tiempo se almacena como un entero de 32 bits con signo, el contador de segundos se desbordará el 19 de enero de 2038. Los sistemas modernos de 64 bits no tienen este problema.
¿El tiempo Unix tiene en cuenta los segundos intercalares?
No, cada día en el tiempo Unix siempre equivale exactamente a 86400 segundos; los segundos intercalares se ignoran. Los sistemas que necesitan una sincronización exacta con el UTC astronómico manejan los segundos intercalares con un mecanismo aparte, fuera del timestamp Unix estándar.
¿Puede un timestamp Unix ser negativo?
Sí, los valores negativos corresponden a fechas anteriores al 1 de enero de 1970. La mayoría de los sistemas modernos manejan estos valores correctamente, aunque algunas API o bibliotecas antiguas podrían no admitirlos.