Timestamp corrente
Il timestamp corrente è noto anche come Unix timestamp, Unix time e Unix epoch. Indica il numero di secondi trascorsi dal 1 gennaio 1970 (mezzanotte UTC / GMT). Non conta i secondi intercalari.
Unix time stamp in: C++, JAVA, Python, PHP, Javascript, MySQL, Unix time on Wikipedia.org
Date recenti
Data | Timestamp Unix |
---|---|
Now | 1611035267 |
1 hour ago | 1611031667 |
2 hours ago | 1611028067 |
3 hours ago | 1611024467 |
6 hours ago | 1611013667 |
12 hours ago | 1610992067 |
1 day ago | 1610948867 |
2 days ago | 1610862467 |
3 days ago | 1610776067 |
1 week ago | 1610430467 |
2 weeks ago | 1609825667 |
3 weeks ago | 1609220867 |
4 weeks ago | 1608616067 |
1 month ago | 1608356867 |
2 months ago | 1605764867 |
3 months ago | 1603086467 |
6 months ago | 1595137667 |
9 months ago | 1587275267 |
1 year ago | 1579412867 |
2 years ago | 1547876867 |
3 years ago | 1516340867 |
5 years ago | 1453182467 |
10 years ago | 1295416067 |
Prossime date
Data | Timestamp Unix |
---|---|
Now | 1611035267 |
In 1 hour | 1611038867 |
In 2 hours | 1611042467 |
In 3 hours | 1611046067 |
In 6 hours | 1611056867 |
In 12 hours | 1611078467 |
In 1 day | 1611121667 |
In 2 days | 1611208067 |
In 3 days | 1611294467 |
In 1 week | 1611640067 |
In 2 weeks | 1612244867 |
In 3 weeks | 1612849667 |
In 4 weeks | 1613454467 |
In 1 month | 1613713667 |
In 2 months | 1616132867 |
In 3 months | 1618811267 |
In 6 months | 1626673667 |
In 9 months | 1634622467 |
In 1 year | 1642571267 |
In 2 years | 1674107267 |
In 3 years | 1705643267 |
In 5 years | 1768801667 |
In 10 years | 1926568067 |
Come ottenere il timestamp attuale in Java
Esempio di come puoi ottenere il timestamp attuale in 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()));
}
}
Output
Come ottenere il timestamp attuale in C++
Esempio di come puoi ottenere il timestamp attuale in 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
Come ottenere il timestamp attuale in Python
Esempio di come puoi ottenere il timestamp attuale in Python
import time
import datetime
print "Current unix time: %s" %time.time()
print "Current date and time: " , datetime.datetime.now()
Output
Come ottenere il timestamp attuale in PHP
Esempio di come puoi ottenere il timestamp attuale in PHP
<?php
echo time();
?>
Output
Come ottenere il timestamp attuale in Javascript
Esempio di come puoi ottenere il timestamp attuale in Javascript
var timestamp = new Date().getTime();
document.write(timestamp);
Output
Come ottenere il timestamp attuale in MySQL
Esempio di come puoi ottenere il timestamp attuale in 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