Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/chrono/c/time t"

From cppreference.com
< cpp‎ | chrono‎ | c
m (Text replace - "/sidebar" to "/navbar")
m (fmt)
 
(7 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
{{cpp/title|time_t}}
 
{{cpp/title|time_t}}
 
{{cpp/chrono/c/navbar}}
 
{{cpp/chrono/c/navbar}}
{{ddcl | header=ctime | 1=
+
{{ddcl|header=ctime|1=
 
typedef /* unspecified */ time_t;
 
typedef /* unspecified */ time_t;
 
}}
 
}}
 
Arithmetic type capable of representing times.
 
Arithmetic type capable of representing times.
  
Although not defined, this is almost always a integral value holding the number of seconds since 00:00, Jan 1 1970 UTC, corresponding to [[enwiki:Unix_time | POSIX time]].
+
Although not defined, this is almost always an integral value holding the number of seconds (not counting leap seconds) since 00:00, Jan 1 1970 UTC, corresponding to [[enwiki:Unix_time|POSIX time]].
  
 
===See also===
 
===See also===
{{dcl list begin}}
+
{{dsc begin}}
{{dcl list template | cpp/chrono/c/dcl list time}}
+
{{dsc inc|cpp/chrono/c/dsc time}}
{{dcl list template | cpp/chrono/c/dcl list localtime}}
+
{{dsc inc|cpp/chrono/c/dsc localtime}}
{{dcl list template | cpp/chrono/c/dcl list gmtime}}
+
{{dsc inc|cpp/chrono/c/dsc gmtime}}
{{dcl list see c | c/chrono/time_t}}
+
{{dsc inc|cpp/chrono/system_clock/dsc to_time_t}}
{{dcl list end}}
+
{{dsc see c|c/chrono/time_t}}
 +
{{dsc end}}
 +
 
 +
{{langlinks|de|es|fr|it|ja|pt|ru|zh}}

Latest revision as of 01:08, 27 October 2023

 
 
Utilities library
General utilities
Relational operators (deprecated in C++20)
 
 
C-style date and time utilities
Functions
Time manipulation
Format conversions
Constants
Types
time_t
(C++17)
 
Defined in header <ctime>
typedef /* unspecified */ time_t;

Arithmetic type capable of representing times.

Although not defined, this is almost always an integral value holding the number of seconds (not counting leap seconds) since 00:00, Jan 1 1970 UTC, corresponding to POSIX time.

[edit] See also

returns the current time of the system as time since epoch
(function) [edit]
converts time since epoch to calendar time expressed as local time
(function) [edit]
converts time since epoch to calendar time expressed as Universal Coordinated Time
(function) [edit]
[static]
converts a system clock time point to std::time_t
(public static member function of std::chrono::system_clock) [edit]
C documentation for time_t