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 | 1653137665 |
1 hour ago | 1653134065 |
2 hours ago | 1653130465 |
3 hours ago | 1653126865 |
6 hours ago | 1653116065 |
12 hours ago | 1653094465 |
1 day ago | 1653051265 |
2 days ago | 1652964865 |
3 days ago | 1652878465 |
1 week ago | 1652532865 |
2 weeks ago | 1651928065 |
3 weeks ago | 1651323265 |
4 weeks ago | 1650718465 |
1 month ago | 1650545665 |
2 months ago | 1647867265 |
3 months ago | 1645448065 |
6 months ago | 1637499265 |
9 months ago | 1629550465 |
1 year ago | 1621601665 |
2 years ago | 1590065665 |
3 years ago | 1558443265 |
5 years ago | 1495371265 |
10 years ago | 1337604865 |
Prossime date
Data | Timestamp Unix |
---|---|
Now | 1653137665 |
In 1 hour | 1653141265 |
In 2 hours | 1653144865 |
In 3 hours | 1653148465 |
In 6 hours | 1653159265 |
In 12 hours | 1653180865 |
In 1 day | 1653224065 |
In 2 days | 1653310465 |
In 3 days | 1653396865 |
In 1 week | 1653742465 |
In 2 weeks | 1654347265 |
In 3 weeks | 1654952065 |
In 4 weeks | 1655556865 |
In 1 month | 1655816065 |
In 2 months | 1658408065 |
In 3 months | 1661086465 |
In 6 months | 1669035265 |
In 9 months | 1676984065 |
In 1 year | 1684673665 |
In 2 years | 1716296065 |
In 3 years | 1747832065 |
In 5 years | 1810904065 |
In 10 years | 1968756865 |
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