Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::chrono::get_tzdb_list,std::chrono::get_tzdb,std::chrono::remote_version,std::chrono::reload_tzdb

      From cppreference.com
      <cpp‎ |chrono
       
       
      Date and time library
      Time zone
      (C++20)
      (C++20)
      get_tzdbget_tzdb_listreload_tzdbremote_version
      (C++20)(C++20)(C++20)(C++20)
      (C++20)
      (C++20)
      (C++20)
      (C++20)
      (C++20)
      C-style date and time
       
      std::chrono::tzdb_list& get_tzdb_list();
      (1)(since C++20)
      conststd::chrono::tzdb& get_tzdb();
      (2)(since C++20)
      std::string remote_version();
      (3)(since C++20)
      conststd::chrono::tzdb& reload_tzdb();
      (4)(since C++20)

      These functions provide access to the program-wide time zone database.

      1) Returns a reference to the globalstd::chrono::tzdb_list singleton. If this is the first access to the database, initialize the database. After the initialization, the database will hold a single initializedstd::chrono::tzdb object. This function is thread-safe: concurrent calls to this function from multiple threads do not introduce a data race.
      2) Returns a reference to the firststd::chrono::tzdb object held by thetzdb_list singleton. Equivalent tostd::chrono::get_tzdb_list().front().
      3) Returns a string containing the latest remote database version.
      4) Ifremote_version()!= get_tzdb().version, pushes a newtzdb object representing the remote database to the front of thetzdb_list singleton referenced byget_tzdb_list(). Otherwise there are no effects. No references, pointers or iterators are invalidated. Calling this function concurrently withget_tzdb_list().front() orget_tzdb_list().erase_after() does not introduce a data race.

      [edit] Exceptions

      1)std::runtime_error if for any reason a reference to atzdb_list containing one or more validtzdb cannot be returned.

      [edit] Return value

      1) A reference to the globalstd::chrono::tzdb_list singleton.
      2)std::chrono::get_tzdb_list().front().
      3) A string containing the latest remote database version.
      4)std::chrono::get_tzdb_list().front() (after any update made by this function).
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/chrono/tzdb_functions&oldid=146347"

      [8]ページ先頭

      ©2009-2025 Movatter.jp