diff options
author | orivej <orivej@yandex-team.ru> | 2022-02-10 16:45:01 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:01 +0300 |
commit | 2d37894b1b037cf24231090eda8589bbb44fb6fc (patch) | |
tree | be835aa92c6248212e705f25388ebafcf84bc7a1 /contrib/libs/cctz/src/time_zone_if.h | |
parent | 718c552901d703c502ccbefdfc3c9028d608b947 (diff) | |
download | ydb-2d37894b1b037cf24231090eda8589bbb44fb6fc.tar.gz |
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/cctz/src/time_zone_if.h')
-rw-r--r-- | contrib/libs/cctz/src/time_zone_if.h | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/contrib/libs/cctz/src/time_zone_if.h b/contrib/libs/cctz/src/time_zone_if.h index 19129cd50c..f925c6c55a 100644 --- a/contrib/libs/cctz/src/time_zone_if.h +++ b/contrib/libs/cctz/src/time_zone_if.h @@ -4,7 +4,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -20,8 +20,8 @@ #include <memory> #include <string> -#include "cctz/civil_time.h" -#include "cctz/time_zone.h" +#include "cctz/civil_time.h" +#include "cctz/time_zone.h" namespace cctz { @@ -32,35 +32,35 @@ class TimeZoneIf { // A factory function for TimeZoneIf implementations. static std::unique_ptr<TimeZoneIf> Load(const std::string& name); - virtual ~TimeZoneIf(); + virtual ~TimeZoneIf(); virtual time_zone::absolute_lookup BreakTime( - const time_point<seconds>& tp) const = 0; + const time_point<seconds>& tp) const = 0; virtual time_zone::civil_lookup MakeTime( const civil_second& cs) const = 0; - virtual bool NextTransition(const time_point<seconds>& tp, - time_zone::civil_transition* trans) const = 0; - virtual bool PrevTransition(const time_point<seconds>& tp, - time_zone::civil_transition* trans) const = 0; - - virtual std::string Version() const = 0; + virtual bool NextTransition(const time_point<seconds>& tp, + time_zone::civil_transition* trans) const = 0; + virtual bool PrevTransition(const time_point<seconds>& tp, + time_zone::civil_transition* trans) const = 0; + + virtual std::string Version() const = 0; virtual std::string Description() const = 0; protected: TimeZoneIf() {} }; -// Convert between time_point<seconds> and a count of seconds since the -// Unix epoch. We assume that the std::chrono::system_clock and the +// Convert between time_point<seconds> and a count of seconds since the +// Unix epoch. We assume that the std::chrono::system_clock and the // Unix clock are second aligned, but not that they share an epoch. -inline std::int_fast64_t ToUnixSeconds(const time_point<seconds>& tp) { - return (tp - std::chrono::time_point_cast<seconds>( - std::chrono::system_clock::from_time_t(0))).count(); +inline std::int_fast64_t ToUnixSeconds(const time_point<seconds>& tp) { + return (tp - std::chrono::time_point_cast<seconds>( + std::chrono::system_clock::from_time_t(0))).count(); } -inline time_point<seconds> FromUnixSeconds(std::int_fast64_t t) { - return std::chrono::time_point_cast<seconds>( - std::chrono::system_clock::from_time_t(0)) + seconds(t); +inline time_point<seconds> FromUnixSeconds(std::int_fast64_t t) { + return std::chrono::time_point_cast<seconds>( + std::chrono::system_clock::from_time_t(0)) + seconds(t); } } // namespace cctz |