현재 타임스탬프
현재 타임 스탬프는 유닉스 타임 스탬프,유닉스 시간 기록 및 유닉스 시대로 알려져 있습니다. 1970 년 1 월 1 일(자정 UTC/GMT)이후 경과 된 초 수를 알려줍니다. 그것은 윤초 계산하지 않습니다.
Unix time stamp in: C++, JAVA, Python, PHP, Javascript, MySQL, Unix time on Wikipedia.org
최근 날짜
날짜 | 유닉스 타임스탬프 |
---|---|
Now | 1653140124 |
1 hour ago | 1653136524 |
2 hours ago | 1653132924 |
3 hours ago | 1653129324 |
6 hours ago | 1653118524 |
12 hours ago | 1653096924 |
1 day ago | 1653053724 |
2 days ago | 1652967324 |
3 days ago | 1652880924 |
1 week ago | 1652535324 |
2 weeks ago | 1651930524 |
3 weeks ago | 1651325724 |
4 weeks ago | 1650720924 |
1 month ago | 1650548124 |
2 months ago | 1647869724 |
3 months ago | 1645450524 |
6 months ago | 1637501724 |
9 months ago | 1629552924 |
1 year ago | 1621604124 |
2 years ago | 1590068124 |
3 years ago | 1558445724 |
5 years ago | 1495373724 |
10 years ago | 1337607324 |
예정일
날짜 | 유닉스 타임스탬프 |
---|---|
Now | 1653140124 |
In 1 hour | 1653143724 |
In 2 hours | 1653147324 |
In 3 hours | 1653150924 |
In 6 hours | 1653161724 |
In 12 hours | 1653183324 |
In 1 day | 1653226524 |
In 2 days | 1653312924 |
In 3 days | 1653399324 |
In 1 week | 1653744924 |
In 2 weeks | 1654349724 |
In 3 weeks | 1654954524 |
In 4 weeks | 1655559324 |
In 1 month | 1655818524 |
In 2 months | 1658410524 |
In 3 months | 1661088924 |
In 6 months | 1669037724 |
In 9 months | 1676986524 |
In 1 year | 1684676124 |
In 2 years | 1716298524 |
In 3 years | 1747834524 |
In 5 years | 1810906524 |
In 10 years | 1968759324 |
Java에서 현재 타임스탬프를 가져오는 방법
다음은 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()));
}
}
산출
2022-05-21 13:35:24.662
C++에서 현재 타임스탬프를 가져오는 방법
다음은 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
Current unix time is 1653140124
#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
Current local time and date: Sat 21 May 13:35:24 2022
Python에서 현재 타임스탬프를 가져오는 방법
다음은 Python에서 현재 타임스탬프를 얻는 방법의 예입니다.
import time
import datetime
print "Current unix time: %s" %time.time()
print "Current date and time: " , datetime.datetime.now()
산출
Current unix time: 1409073472.17
Current date and time: 2014-08-26 12:17:52.165704
PHP에서 현재 타임스탬프를 가져오는 방법
다음은 PHP에서 현재 타임스탬프를 얻는 방법의 예입니다.
<?php
echo time();
?>
산출
1653140124
Javascript에서 현재 타임스탬프를 가져오는 방법
다음은 Javascript에서 현재 타임스탬프를 얻는 방법의 예입니다.
var timestamp = new Date().getTime();
document.write(timestamp);
산출
MySQL에서 현재 타임스탬프를 가져오는 방법
다음은 MySQL에서 현재 타임스탬프를 얻는 방법의 예입니다.
CREATE TABLE `mytable` (
`id` int(11) NOT NULL,
`text` varchar(100) NOT NULL,
`epoch` int(11) NOT NULL
);
Option 1
INSERT INTO mytable
VALUES(1,'hello',UNIX_TIMESTAMP('2022-05-21 13:35:24'))
Option 2
INSERT INTO mytable
VALUES(1,'hello',UNIX_TIMESTAMP('1653140124'))
Option 3
INSERT INTO mytable
VALUES(1,'hello',UNIX_TIMESTAMP(now()))
SELECT FROM_UNIXTIME(1653140124);
Output
2022-05-21 13:35:24