horodatage Unix

✅ Horodatage UNIX en ligne, obtenir l'horodatage UNIX actuel (10 chiffres), convertir une chaîne de date/heure standard en millisecondes
Outils de développement Outils de date et d'heure

Horodatage Unix

Horodatage actuel
Horodatage Unix

Heure de Pékin

Comment obtenir un horodatage Unix dans différents langages de programmation :

Langage de programmation S MS
JavaScript Math.round(new Date() / 1000) new Date().getTime()
Java System.currentTimeMillis() / 1000 System.currentTimeMillis()
Python int(time.time()) int(time.time() * 1000)
Go time.Now().Unix() time.Now().UnixNano() / 1e6
PHP time() (int)(microtime(true) * 1000)
Ruby Time.now.to_i (Time.now.to_f * 1000).to_i
C# DateTimeOffset.UtcNow.ToUnixTimeSeconds() DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()
Swift NSDate().timeIntervalSince1970 NSDate().timeIntervalSince1970 * 1000
Objective-C [[NSDate date] timeIntervalSince1970] [[NSDate date] timeIntervalSince1970] * 1000