현재 타임스탬프
현재 타임 스탬프는 유닉스 타임 스탬프,유닉스 시간 기록 및 유닉스 시대로 알려져 있습니다. 1970 년 1 월 1 일(자정 UTC/GMT)이후 경과 된 초 수를 알려줍니다. 그것은 윤초 계산하지 않습니다.
Unix time stamp in: C++, JAVA, Python, PHP, Javascript, MySQL, Unix time on Wikipedia.org
최근 날짜
날짜 | 유닉스 타임스탬프 |
---|---|
Now | 1611666568 |
1 hour ago | 1611662968 |
2 hours ago | 1611659368 |
3 hours ago | 1611655768 |
6 hours ago | 1611644968 |
12 hours ago | 1611623368 |
1 day ago | 1611580168 |
2 days ago | 1611493768 |
3 days ago | 1611407368 |
1 week ago | 1611061768 |
2 weeks ago | 1610456968 |
3 weeks ago | 1609852168 |
4 weeks ago | 1609247368 |
1 month ago | 1608988168 |
2 months ago | 1606396168 |
3 months ago | 1603717768 |
6 months ago | 1595768968 |
9 months ago | 1587906568 |
1 year ago | 1580044168 |
2 years ago | 1548508168 |
3 years ago | 1516972168 |
5 years ago | 1453813768 |
10 years ago | 1296047368 |
예정일
날짜 | 유닉스 타임스탬프 |
---|---|
Now | 1611666568 |
In 1 hour | 1611670168 |
In 2 hours | 1611673768 |
In 3 hours | 1611677368 |
In 6 hours | 1611688168 |
In 12 hours | 1611709768 |
In 1 day | 1611752968 |
In 2 days | 1611839368 |
In 3 days | 1611925768 |
In 1 week | 1612271368 |
In 2 weeks | 1612876168 |
In 3 weeks | 1613480968 |
In 4 weeks | 1614085768 |
In 1 month | 1614344968 |
In 2 months | 1616764168 |
In 3 months | 1619442568 |
In 6 months | 1627304968 |
In 9 months | 1635253768 |
In 1 year | 1643202568 |
In 2 years | 1674738568 |
In 3 years | 1706274568 |
In 5 years | 1769432968 |
In 10 years | 1927199368 |
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()));
}
}
산출
2021-01-26 13:09:28.231
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 1611666568
#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: Tue 26 Jan 13:09:28 2021
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();
?>
산출
1611666568
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('2021-01-26 13:09:28'))
Option 2
INSERT INTO mytable VALUES(1,'hello',UNIX_TIMESTAMP('1611666568'))
Option 3
INSERT INTO mytable VALUES(1,'hello',UNIX_TIMESTAMP(now()))
SELECT FROM_UNIXTIME(1611666568);
Output
2021-01-26 13:09:28