chrono_tzdb_list

chrono_tzdb_list (시간대 데이터베이스 목록)

std::chrono::tzdb_list는 시간대 데이터베이스의 연결 리스트를 나타내는 타입이에요. 버전이 갱신될 때마다 새 데이터베이스가 추가돼요.

출처: cppreference

본문

std::chrono::tzdb_list<chrono> 헤더에 정의된 클래스예요. C++20부터 사용 가능해요.

class tzdb_list;

시간대 데이터베이스들의 연결 리스트예요. 첫 번째 요소가 현재 데이터베이스예요.

주요 멤버 함수

  • front() — 첫 번째(현재) tzdb 반환
  • erase_after(iterator) — 지정 데이터베이스 이후 항목 제거
  • begin() / end() — 반복자

std::chrono::get_tzdb_list()로 접근할 수 있어요.

예제 (Example)

#include <chrono>
#include <iostream>

int main()
{
    auto& tzdb_list = std::chrono::get_tzdb_list();
    std::cout << tzdb_list.front().version << '\n';
}

더 알아보기 (Learn more)

cppreference