Horodatage actuel
L'horodatage actuel est également appelé horodatage Unix, heure Unix et époque Unix. Il indique le nombre de secondes qui se sont écoulées depuis le 1er janvier 1970 (minuit UTC / GMT). Il ne compte pas les secondes intercalaires.
Unix time stamp in: C++, JAVA, Python, PHP, Javascript, MySQL, Unix time on Wikipedia.org
Dates récentes
Date | Horodatage Unix |
---|---|
Now | 1618835662 |
1 hour ago | 1618832062 |
2 hours ago | 1618828462 |
3 hours ago | 1618824862 |
6 hours ago | 1618814062 |
12 hours ago | 1618792462 |
1 day ago | 1618749262 |
2 days ago | 1618662862 |
3 days ago | 1618576462 |
1 week ago | 1618230862 |
2 weeks ago | 1617626062 |
3 weeks ago | 1617021262 |
4 weeks ago | 1616416462 |
1 month ago | 1616157262 |
2 months ago | 1613738062 |
3 months ago | 1611059662 |
6 months ago | 1603110862 |
9 months ago | 1595162062 |
1 year ago | 1587299662 |
2 years ago | 1555677262 |
3 years ago | 1524141262 |
5 years ago | 1461069262 |
10 years ago | 1303216462 |
Dates à venir
Date | Horodatage Unix |
---|---|
Now | 1618835662 |
In 1 hour | 1618839262 |
In 2 hours | 1618842862 |
In 3 hours | 1618846462 |
In 6 hours | 1618857262 |
In 12 hours | 1618878862 |
In 1 day | 1618922062 |
In 2 days | 1619008462 |
In 3 days | 1619094862 |
In 1 week | 1619440462 |
In 2 weeks | 1620045262 |
In 3 weeks | 1620650062 |
In 4 weeks | 1621254862 |
In 1 month | 1621427662 |
In 2 months | 1624106062 |
In 3 months | 1626698062 |
In 6 months | 1634646862 |
In 9 months | 1642595662 |
In 1 year | 1650371662 |
In 2 years | 1681907662 |
In 3 years | 1713530062 |
In 5 years | 1776602062 |
In 10 years | 1934368462 |
Comment obtenir l'horodatage actuel dans Java
Voici un exemple comment vous pouvez obtenir l'horodatage actuel dans Java
import java.sql.Timestamp;
import java.util.Date;
public class CurrentTimeStamp
{
public static void main( String[] args )
{
java.util.Date date= new java.util.Date();
System.out.println(new Timestamp(date.getTime()));
}
}
Sortie
Comment obtenir l'horodatage actuel dans C++
Voici un exemple comment vous pouvez obtenir l'horodatage actuel dans C++
#include <stdio.h>
#include <time.h>
int main()
{
time_t now;
now = time(NULL);
printf("Current unix time is %d", now);
return 0;
}
execution
#include <stdio.h>
#include <time.h>
int main ()
{
time_t rawtime;
struct tm * timeinfo;
time (&rawtime);
timeinfo = localtime (&rawtime);
printf ("Current local time and date: %s", asctime(timeinfo));
return 0;
}
execution
Comment obtenir l'horodatage actuel dans Python
Voici un exemple comment vous pouvez obtenir l'horodatage actuel dans Python
import time
import datetime
print "Current unix time: %s" %time.time()
print "Current date and time: " , datetime.datetime.now()
Sortie
Comment obtenir l'horodatage actuel dans PHP
Voici un exemple comment vous pouvez obtenir l'horodatage actuel dans PHP
<?php
echo time();
?>
Sortie
Comment obtenir l'horodatage actuel dans Javascript
Voici un exemple comment vous pouvez obtenir l'horodatage actuel dans Javascript
var timestamp = new Date().getTime();
document.write(timestamp);
Sortie
Comment obtenir l'horodatage actuel dans MySQL
Voici un exemple comment vous pouvez obtenir l'horodatage actuel dans MySQL
CREATE TABLE `mytable` (
`id` int(11) NOT NULL,
`text` varchar(100) NOT NULL,
`epoch` int(11) NOT NULL
);
Option 1
Option 2
Option 3
Output