Conversor de fecha/hora

Un analizador integral de fecha y hora que maneja marcas de tiempo Unix, fechas ISO 8601, formato RFC 2822, estilos de fecha EE.UU./EU, fechas largas y expresiones relativas. Convierte entre formatos, muestra tiempo relativo y proporciona referencia de marca de tiempo actual.

Especificaciones

Casos de uso comunes

  • Depurar respuestas de API que contienen marcas de tiempo o fechas
  • Convertir marcas de tiempo de archivos de registro a fechas legibles
  • Analizar fechas de diferentes formatos regionales
  • Calcular diferencias de tiempo entre eventos
  • Generar marcas de tiempo para solicitudes de API
  • Verificar tiempos de expiración de tokens (declaración exp de JWT)
  • Convertir entre formatos de fecha para equipos internacionales

Funcionalidades

  • Detección automática de formato: marcas de tiempo Unix, ISO 8601, RFC 2822, fechas EE.UU./EU y más
  • Analizar marcas de tiempo Unix en segundos, milisegundos, microsegundos o nanosegundos
  • Manejar fechas ISO 8601 con o sin hora (2024-01-25T12:00:00Z)
  • Analizar formato EE.UU. (01/25/2024), formato EU (25.01.2024) y fechas largas (January 25, 2024)
  • Reconocer expresiones relativas: now, today, yesterday, tomorrow
  • Mostrar tiempo relativo ("hace 2 horas", "en 3 días")
  • Indicadores de estado Pasado/Futuro/Hoy
  • Mostrar día de la semana, número de semana, trimestre y día del año
  • Cuadrícula de métricas de calendario (semana del año, trimestre, día del año)
  • Sección de información adicional (zona horaria, días en el mes, año bisiesto)
  • Convertir a múltiples formatos de salida con botones de copia
  • Salida en microsegundos y nanosegundos Unix
  • Tarjeta de referencia de hora actual con botón de actualizar

Ejemplos

Marca de tiempo Unix (segundos)

Pruébalo →

Una marca de tiempo Unix estándar en segundos.

1706188800

Marca de tiempo Unix (milisegundos)

Pruébalo →

Una marca de tiempo estilo JavaScript en milisegundos.

1706188800000

Fecha/hora ISO 8601

Pruébalo →

Formato ISO 8601 estándar con zona horaria.

2024-01-25T12:00:00Z

Fecha ISO 8601 solamente

Pruébalo →

Fecha sin componente de hora.

2024-01-25

Formato de fecha EE.UU.

Pruébalo →

Formato Mes/Día/Año común en Estados Unidos.

01/25/2024

Formato de fecha EU

Pruébalo →

Formato Día.Mes.Año común en Europa.

25.01.2024

Fecha larga

Pruébalo →

Formato de fecha legible para humanos.

January 25, 2024

Fecha relativa

Pruébalo →

Las expresiones relativas se analizan como hora actual.

now

Consejos

  • JavaScript Date.now() devuelve milisegundos; la mayoría de herramientas Unix usan segundos.
  • El formato ISO 8601 (2024-01-25T12:00:00Z) es el formato más portable e inequívoco.
  • Use marcas de tiempo UTC para almacenamiento; convierta a hora local solo para visualización.
  • Cuando una fecha es ambigua (ej. 01/02/2024), la herramienta usa pistas de contexto para determinar el formato.
  • El "problema del año 2038" afecta a sistemas de 32 bits que usan enteros con signo para segundos Unix.

Comprender Conversor de fecha/hora

Unix timestamps represent a specific moment in time as the number of seconds elapsed since the Unix epoch: January 1, 1970, at 00:00:00 UTC. This simple integer representation is the universal time format in computing, used by databases, APIs, file systems, log files, and operating system interfaces. The format is unambiguous — unlike human-readable dates, a Unix timestamp always refers to exactly one moment in time regardless of timezone.

Two precision levels are common. Second-precision timestamps (10 digits, like 1738800000) are the traditional Unix format used by most Unix APIs, databases, and the C time() function. Millisecond-precision timestamps (13 digits, like 1738800000000) are used by JavaScript (Date.now()), Java (System.currentTimeMillis()), and many web APIs. This tool auto-detects the precision and handles both correctly.

ISO 8601 is the standard human-readable date-time format: 2025-02-05T12:00:00Z. The T separates date and time, and Z indicates UTC (Zulu time). Timezone offsets use +HH:MM or -HH:MM notation. ISO 8601 is required by JSON Schema, widely used in REST APIs, and recommended for any date-time string interchange. RFC 2822 format (used in email headers) is another common text representation.

Timezone handling is the most common source of date-time bugs. Developers frequently confuse UTC timestamps with local times, apply timezone conversions incorrectly, or store local times without timezone information. Best practice is to always store and transmit times in UTC, converting to local time only for display.

Systems storing Unix timestamps as 32-bit signed integers will overflow on January 19, 2038, at 03:14:07 UTC, wrapping to a negative number that represents December 1901. This is analogous to Y2K but affects computing infrastructure more broadly. The fix is to use 64-bit integers, which extends the range to billions of years. Most modern systems already use 64-bit time, but embedded systems and legacy code may still be vulnerable.

When choosing between storing dates as timestamps or formatted strings, consider the use case. Timestamps (integers) are ideal for computation-heavy scenarios like sorting, calculating durations, and comparing dates — they are compact, unambiguous, and timezone-neutral. ISO 8601 strings are preferable when human readability matters, when timezone context must be preserved, or when the database has native datetime types. PostgreSQL's timestamptz, for example, stores UTC internally and converts for display.

Dates that appear to be off by one day are almost always caused by timezone confusion. A UTC timestamp for February 5 at 23:00 UTC is already February 6 in UTC+2 timezones. In JavaScript, Date() uses local time for date-only strings but UTC for datetime strings with timezone designators. Being explicit about timezones and consistently using UTC for storage and transmission prevents these subtle bugs.

← Volver a todas las herramientas