Guide
UTC와 GMT의 차이
소개
UTC와 GMT는 개발자와 사용자 모두가 종종 혼동하는 두 가지 시간 표준입니다. 일상적인 사용에서는 상호 교환이 가능한 것처럼 보일 수 있지만 소프트웨어 개발, 시간에 민감한 애플리케이션 및 글로벌 시스템에 중요한 기술적 차이점이 있습니다.
간략한 요약: UTC는 원자시계를 기반으로 한 정확한 시간 표준인 반면, GMT는 천문 관측을 기반으로 합니다. UTC는 대부분의 애플리케이션에 대한 최신 표준인 반면 GMT는 주로 시간대 이름입니다.
UTC란 무엇인가요?
정의
UTC(협정 세계시)는 전 세계에서 시계와 시간을 규제하는 기본 시간 표준입니다. 국제원자시(TAI)를 기준으로 하며 UT1(태양시)의 0.9초 이내를 유지하기 위해 윤초를 추가했습니다.
UTC Characteristics:
- Based on: Atomic clocks (International Atomic Time - TAI)
- Precision: ±0.9 seconds from UT1 (solar time)
- Time Zone: No time zone offset (UTC+0)
- Daylight Saving: No DST adjustments
- Usage: Worldwide standard for computing, internet, and aviation
주요 기능
- 원자 시간 기준: UTC는 극도의 정확성을 위해 전 세계적으로 수백 개의 원자 시계를 사용합니다.
- 윤초: 지구의 자전과 동기화를 유지하기 위해 간헐적으로 1초 조정
- 범용 참조: 모든 시간대(UTC+X, UTC-X)의 기준 시간으로 사용됩니다.
- DST-Free: 일광 절약 시간제에 따라 변경되지 않습니다.
코드 예: UTC 시간 가져오기
// Get current UTC time
const now = new Date();
const utcString = now.toISOString(); // "2026-01-01T12:00:00.000Z"
const utcTimestamp = Math.floor(now.getTime() / 1000); // 1735689600
console.log('UTC ISO String:', utcString);
console.log('UTC Timestamp:', utcTimestamp);
from datetime import datetime, timezone
# Get current UTC time
now_utc = datetime.now(timezone.utc)
utc_iso = now_utc.isoformat()
utc_timestamp = int(now_utc.timestamp())
print(f'UTC ISO String: {utc_iso}')
print(f'UTC Timestamp: {utc_timestamp}')
import java.time.Instant;
import java.time.ZoneOffset;
// Get current UTC time
Instant now = Instant.now();
String utcIso = now.toString();
long utcTimestamp = now.getEpochSecond();
System.out.println("UTC ISO String: " + utcIso);
System.out.println("UTC Timestamp: " + utcTimestamp);
GMT란 무엇인가요?
정의
GMT(그리니치 표준시)는 원래 런던 그리니치에 있는 왕립 천문대의 태양시를 기준으로 한 시간대입니다. 역사적으로 이는 세계의 기본 시간 표준으로 사용되었지만 대부분 UTC로 대체되었습니다.
GMT Characteristics:
- Based on: Astronomical observations (solar time at Greenwich)
- Precision: Varies with Earth's rotation irregularities
- Time Zone: UTC+0 (during winter), UTC+1 (during summer in UK)
- Daylight Saving: Subject to UK daylight saving time (BST)
- Usage: UK time zone name, some maritime operations
역사적 맥락
GMT는 1884년 International Meridian Conference에서 설립되었습니다. 1960년대 UTC가 채택되기 전까지 이는 세계 최초의 시간 표준이었습니다.
코드 예: GMT 시간 가져오기
// Get current GMT (London) time
const now = new Date();
const options = { timeZone: 'Europe/London', timeZoneName: 'short' };
const gmtString = now.toLocaleString('en-US', options);
console.log('GMT/London Time:', gmtString);
// Note: This shows GMT or BST depending on UK daylight saving
# Get current GMT (London) time
from datetime import datetime
import pytz
# Get current GMT (London) time
london_tz = pytz.timezone('Europe/London')
now_london = datetime.now(london_tz)
print(f'GMT/London Time: {now_london.strftime("%Y-%m-%d %H:%M:%S %Z")}')
# Note: This shows GMT or BST depending on UK daylight saving
// Get current GMT (London) time
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
// Get current GMT (London) time
ZoneId londonZone = ZoneId.of("Europe/London");
ZonedDateTime londonTime = ZonedDateTime.now(londonZone);
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss z");
System.out.println("GMT/London Time: " + londonTime.format(formatter));
// Note: This shows GMT or BST depending on UK daylight saving
주요 차이점: UTC와 GMT
비교표
| 기능 | UTC(협정 세계시) | GMT(그리니치 표준시) |
|---|---|---|
| 기준 | 원자시계(TAI) | 그리니치의 태양 관측 |
| 정밀도 | ±0.9초 | 지구의 자전에 따라 달라집니다 |
| 시간대 | 변경되지 않음(UTC+0) | 영국 DST(GMT/BST)에 따른 변경 사항 |
| DST 조정 | 아니요 | 예(영국은 여름에 BST를 따릅니다) |
| 윤초 | 예(지구 자전과 일치하도록) | 아니요(윤초를 사용하지 않음) |
| 주요 용도 | 컴퓨팅, 인터넷, 항공 | 영국 시간대, 해양 |
| ISO 8601 | UTC 표준을 사용합니다 | ISO 8601의 표준이 아님 |
| 프로그래밍 API | 대부분은 내부적으로 UTC를 사용합니다 | API에서는 거의 사용되지 않음 |
윤초 요소
UTC는 때때로 윤초를 추가하거나 빼서 지구의 자전과 동기화를 유지합니다. 2026년 현재 차이점은 다음과 같습니다.
UTC - TAI = -37 seconds (UTC is 37 seconds behind atomic time)
UTC - UT1 = ±0.9 seconds (UTC is kept close to solar time)
Current UTC-GMT offset: Usually 0, but varies slightly due to leap seconds
중요: 일상적인 사용에서는 UTC와 GMT가 동일하게 취급되는 경우가 많지만 윤초로 인해 최대 0.9초까지 차이가 날 수 있습니다. 대부분의 애플리케이션에서 이 차이는 무시할 수 있지만 다음과 같은 경우에는 중요합니다.
- 초단타매매
- 과학적 연구
- 정확한 동기화 시스템
UTC와 GMT를 사용해야 하는 경우
UTC를 사용하는 경우
- 소프트웨어 개발: 대부분의 프로그래밍 언어는 내부적으로 UTC를 사용합니다.
- 데이터베이스 타임스탬프: 일관성을 위해 모든 시간을 UTC로 저장합니다.
- API 응답: 보편적인 해석을 위해 UTC 타임스탬프를 반환합니다.
- 글로벌 시스템: 여러 시간대에 걸쳐 사용되는 애플리케이션
- 동기화: 정확한 시간 조정이 필요한 시스템
// Example: Store timestamps in UTC database
const timestamp = Date.now(); // UTC milliseconds
// Store in database: 17356896000000
// Display in user's local time
const userTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
const localTime = new Date(timestamp).toLocaleString('en-US', { timeZone: userTimeZone });
다음 경우에 GMT를 사용하세요.
- UK Time Zone: 영국(유럽/런던)의 시간을 나타냅니다.
- 역사적 데이터: GMT가 표준이었던 1972년 이전 타임스탬프 처리
- 해상 작전: 일부 해양 시스템은 여전히 GMT를 참조합니다.
- 레거시 시스템: 특별히 GMT를 사용하는 이전 시스템
// Example: UK time zone handling
const now = new Date();
const ukTime = now.toLocaleString('en-GB', { timeZone: 'Europe/London' });
// Displays as "01/01/2026, 12:00:00 GMT" or "01/01/2026, 13:00:00 BST"
시간대 변환 예
현지 시간을 UTC로 변환
function convertToUTC(dateString, timeZone) {
const date = new Date(dateString);
const utcString = date.toISOString();
const utcTimestamp = Math.floor(date.getTime() / 1000);
return {
input: dateString,
timeZone: timeZone,
utcString: utcString,
utcTimestamp: utcTimestamp
};
}
// Example: Convert Tokyo time to UTC
const result = convertToUTC('2026-01-01 20:00:00', 'Asia/Tokyo');
console.log(result);
// Output: { utcString: "2026-01-01T11:00:00.000Z", utcTimestamp: 1735659600 }
from datetime import datetime
import pytz
def convert_to_utc(date_string, time_zone):
tz = pytz.timezone(time_zone)
local_time = tz.localize(datetime.strptime(date_string, "%Y-%m-%d %H:%M:%S"))
utc_time = local_time.astimezone(pytz.UTC)
return {
"input": date_string,
"time_zone": time_zone,
"utc_string": utc_time.isoformat(),
"utc_timestamp": int(utc_time.timestamp())
}
# Example: Convert Tokyo time to UTC
result = convert_to_utc('2026-01-01 20:00:00', 'Asia/Tokyo')
print(result)
# Output: {'utc_string': '2026-01-01T11:00:00Z', 'utc_timestamp': 1735659600}
UTC 시간대 오프셋 참조
UTC+0: London (winter), Dublin (winter), Lisbon (winter)
UTC+1: Berlin, Paris, Rome, Madrid (winter), London (summer/BST)
UTC+2: Cairo, Helsinki, Athens, Johannesburg
UTC+3: Moscow, Istanbul, Baghdad, Nairobi
UTC+4: Dubai, Tbilisi, Baku
UTC+5: Karachi, Tashkent, Maldives
UTC+5:30: Mumbai, Kolkata, New Delhi
UTC+8: Beijing, Shanghai, Singapore, Perth
UTC+9: Tokyo, Seoul, Pyongyang
UTC+10: Sydney, Melbourne, Guam
UTC-5: New York (EST), Toronto (EST), Lima
UTC+8: Los Angeles (PST), San Francisco (PST), Vancouver (PST)
피해야 할 일반적인 실수
실수 1: UTC = GMT 항상 가정
종종 동일하지만 최대 0.9초까지 다를 수 있습니다. 고정밀 애플리케이션의 경우 UTC를 명시적으로 사용하세요.
// ❌ Incorrect: Using GMT interchangeably with UTC
const gmtTime = new Date().toGMTString(); // Deprecated method
// ✅ Correct: Using UTC explicitly
const utcTime = new Date().toISOString(); // Proper UTC format
실수 2: UTC 대신 현지 시간을 저장
타임스탬프는 항상 UTC로 저장하고 표시용으로만 현지 시간으로 변환하세요.
// ❌ Incorrect: Storing local time in database
const localTime = new Date().toLocaleString();
db.save({ created_at: localTime }); // Ambiguous time zone
// ✅ Correct: Storing UTC timestamp in database
const utcTimestamp = Date.now();
db.save({ created_at: utcTimestamp }); // Universal reference
실수 3: 시간대 데이터베이스 규칙 무시
고정된 시간대 오프셋을 가정하지 마세요. 정확한 변환을 위해 IANA 시간대 데이터베이스를 사용하세요.
// ❌ Incorrect: Assuming fixed offset for a location
const tokyoOffset = 9 * 60 * 60 * 1000; // UTC+9 in milliseconds
// ✅ Correct: Using IANA time zone database
const tokyoTime = new Date().toLocaleString('en-US', { timeZone: 'Asia/Tokyo' });
모범 사례
개발자용
- 데이터베이스에 항상 UTC로 타임스탬프를 저장
- 문자열 표현에는 ISO 8601 형식을 사용하세요:
2026-01-01T12:00:00Z - 더 나은 UX를 위해 사용자의 현지 시간대로 시간 표시
- IANA 시간대 식별자를 사용하세요(예: 'EST'가 아닌 'America/New_York')
- 적절한 시간대 라이브러리를 사용하여 일광 절약 시간 처리
추천 라이브러리
| 언어 | 도서관 | 목적 |
|---|---|---|
| 자바스크립트 | date-fns-tz, luxon, moment-timezone | 시간대 처리 |
| 파이썬 | pytz, zoneinfo(Python 3.9+) | 시간대 처리 |
| 자바 | java.time(Java 8+) | 시간대 및 날짜 처리 |
| 이동 | time 패키지(표준 라이브러리) | 시간대 처리 |
| 루비 | tzinfo | 시간대 처리 |
결론
UTC와 GMT는 서로 다른 용도로 사용됩니다.
- UTC는 원자시계를 기반으로 한 현대적이고 정확한 시간 표준입니다.
- GMT는 기본적으로 태양시를 기준으로 한 영국의 시간대 이름입니다.
소프트웨어 개발 및 글로벌 시스템의 경우 항상 UTC를 시간 표준으로 사용하십시오. 특별히 영국 시간대 표현이나 레거시 시스템 호환성이 필요한 경우에만 GMT를 사용하세요.
관련 도구
- Unix 타임스탬프 변환기 - Unix 타임스탬프와 날짜 간 변환
- ISO 8601 변환기 - ISO 8601 타임스탬프 사용
- 시간대 변환기 - 시간대 간 시간 변환
- 현재 타임스탬프 - 현재 UTC 시간을 여러 형식으로 가져옵니다.
FAQ
Q: UTC는 GMT와 동일합니까?
A: 일상적인 사용에서는 동일하게 취급되는 경우가 많지만 최대 0.9초까지 다를 수 있습니다. UTC는 원자시계를 기반으로 하고 GMT는 태양 관측을 기반으로 합니다.
Q: UTC에서는 일광 절약 시간을 준수합니까?
A: 아니요. UTC는 일광 절약 시간제에 따라 변경되지 않습니다. 일정한 시간 기준입니다. 시간대는 UTC에서 오프셋을 조정할 수 있지만(예: UTC+1에서 UTC+2로) UTC 자체는 변경되지 않습니다.
Q: 시간대 설정에 "GMT"가 표시되는 이유는 무엇입니까?
A: 많은 시스템에서는 UTC+0의 기존 이름으로 "GMT"를 사용합니다. 최신 응용 프로그램에서 이는 일반적으로 천문학적인 그리니치 표준시가 아닌 UTC+0 시간대를 나타냅니다.
Q: 시간대는 몇 개인가요?
A: 24개의 표준 시간대(UTC-12 ~ UTC+14)가 있지만 IANA 데이터베이스에는 역사적 변화, DST 규칙 및 지역적 변화를 설명하기 위해 400개 이상의 명명된 시간대가 포함되어 있습니다.
Q: 신청서에 UTC 또는 GMT를 사용해야 합니까?
답변: UTC를 사용하세요. 거의 모든 프로그래밍 언어, 데이터베이스 및 API에서 사용되는 최신 표준입니다. 특별히 영국 시간대 표현이 필요한 경우에만 GMT를 사용하세요.