Tempo/Numeri
Unix Timestamp ↔ Data
Converti il tempo Unix in una data e viceversa, con supporto per qualsiasi fuso orario (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.
Articolo su questo strumento: Tempo Unix: perché i computer contano il tempo dal 1970
Domande frequenti
Cos'è un timestamp Unix?
È il numero di secondi trascorsi dal 1° gennaio 1970, 00:00:00 UTC (l'epoca Unix). Questo numero non è legato a nessun fuso orario — il fuso orario viene applicato solo quando si mostra la data a una persona.
Qual è la differenza tra secondi e millisecondi?
JavaScript e alcune API (come Date.now()) restituiscono un timestamp in millisecondi, mentre il tempo Unix classico è in secondi. Confondere l'unità dà una data nel 1970 o in un futuro lontano — scegli l'unità giusta nel campo "Unità".
Il tempo Unix tiene conto dei secondi intercalari?
No, ogni giorno nel tempo Unix equivale sempre esattamente a 86400 secondi, i secondi intercalari vengono ignorati. I sistemi che richiedono una sincronizzazione esatta con l'UTC astronomico gestiscono i secondi intercalari con un meccanismo separato, al di fuori del timestamp Unix standard.
Un timestamp Unix può essere negativo?
Sì, i valori negativi corrispondono a date precedenti al 1° gennaio 1970. La maggior parte dei sistemi moderni gestisce correttamente tali valori, anche se alcune API o librerie meno recenti potrebbero non supportarli.
Cos'è il problema dell'anno 2038?
Sui sistemi in cui un timestamp è memorizzato come intero con segno a 32 bit, il contatore dei secondi andrà in overflow il 19 gennaio 2038. I moderni sistemi a 64 bit non hanno questo problema.