Skip to content

Commit 4067300

Browse files
committed
Revert "[libc++][TZDB] Implements time_zone::to_local. (llvm#91003)"
This reverts commit da03175.
1 parent b510fb2 commit 4067300

File tree

4 files changed

+0
-130
lines changed

4 files changed

+0
-130
lines changed

libcxx/include/__chrono/time_zone.h

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -129,24 +129,6 @@ class _LIBCPP_AVAILABILITY_TZDB time_zone {
129129
return {};
130130
}
131131

132-
template <class _Duration>
133-
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI local_time<common_type_t<_Duration, seconds>>
134-
to_local(const sys_time<_Duration>& __time) const {
135-
using _Dp = common_type_t<_Duration, seconds>;
136-
137-
sys_info __info = get_info(__time);
138-
139-
_LIBCPP_ASSERT_ARGUMENT_WITHIN_DOMAIN(
140-
__info.offset >= chrono::seconds{0} || __time.time_since_epoch() >= _Dp::min() - __info.offset,
141-
"cannot convert the system time; it would be before the minimum local clock value");
142-
143-
_LIBCPP_ASSERT_ARGUMENT_WITHIN_DOMAIN(
144-
__info.offset <= chrono::seconds{0} || __time.time_since_epoch() <= _Dp::max() - __info.offset,
145-
"cannot convert the system time; it would be after the maximum local clock value");
146-
147-
return local_time<_Dp>{__time.time_since_epoch() + __info.offset};
148-
}
149-
150132
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI const __impl& __implementation() const noexcept { return *__impl_; }
151133

152134
private:

libcxx/include/chrono

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -778,10 +778,6 @@ class time_zone {
778778
template<class Duration>
779779
sys_time<common_type_t<Duration, seconds>>
780780
to_sys(const local_time<Duration>& tp, choose z) const;
781-
782-
template<class Duration>
783-
local_time<common_type_t<Duration, seconds>>
784-
to_local(const sys_time<Duration>& tp) const;
785781
};
786782
bool operator==(const time_zone& x, const time_zone& y) noexcept; // C++20
787783
strong_ordering operator<=>(const time_zone& x, const time_zone& y) noexcept; // C++20

libcxx/test/libcxx/time/time.zone/time.zone.timezone/time.zone.members/assert.to_local.pass.cpp

Lines changed: 0 additions & 40 deletions
This file was deleted.

libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/to_local.pass.cpp

Lines changed: 0 additions & 68 deletions
This file was deleted.

0 commit comments

Comments
 (0)