Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::chrono::file_clock::to_utc,std::chrono::file_clock::from_utc

      From cppreference.com
      <cpp‎ |chrono‎ |file clock
       
       
      Date and time library
       
       
      template<class Duration>

      staticstd::chrono::utc_time</* see below */>

          to_utc(conststd::chrono::file_time<Duration>& t);
      (1)(since C++20)
      (optional*)
      template<class Duration>

      staticstd::chrono::file_time</* see below */>

          from_utc(conststd::chrono::utc_time<Duration>& t);
      (2)(since C++20)
      (optional*)
      1) Converts thefile_timet to autc_time representing the same point in time.
      2) Converts theutc_timet to afile_time representing the same point in time.

      The duration of the return type is computed fromDuration in an unspecified manner.

      These function templates are optional: an implementation may choose to instead provideto_sys() andfrom_sys().

      Contents

      [edit]Return value

      1) Autc_time representing the same point in time as the argument.
      2) Afile_time representing the same point in time as the argument.

      [edit]Notes

      User code should usually usestd::chrono::clock_cast, which provides a generic interface to convert time points between clocks, rather than call these functions directly.

      [edit]Example

      This section is incomplete
      Reason: no example

      [edit]See also

      [static](optional)
      converts betweenfile_time andsys_time
      (public static member function)[edit]
      (C++20)
      convert time points of one clock to another
      (function template)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/chrono/file_clock/to_from_utc&oldid=177462"

      [8]ページ先頭

      ©2009-2026 Movatter.jp