absl::Time::Time

Constructs a Time representing the Unix epoch.

Synopsis

Declared in <absl/time/time.h>

constexpr
Time() = default;

Description

Returns the Unix epoch. However, those reading your code may not know or expect the Unix epoch as the default value, so make your code more readable by explicitly initializing all instances before use.

Example: absl::Time t = absl::UnixEpoch(); absl::Time t = absl::Now(); absl::Time t = absl::TimeFromTimeval(tv); absl::Time t = absl::InfinitePast();