[llvm-branch-commits] [libcxx] [libc++][TZDB] Finishes zoned_time constructors. (PR #95010)

Louis Dionne via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Jun 18 09:00:00 PDT 2024


================
@@ -0,0 +1,105 @@
+//===----------------------------------------------------------------------===/
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++03, c++11, c++14, c++17
+// UNSUPPORTED: no-filesystem, no-localization, no-tzdb
+
+// XFAIL: libcpp-has-no-experimental-tzdb
+// XFAIL: availability-tzdb-missing
+
+// <chrono>
+
+// template<class Duration, class TimeZonePtr = const time_zone*>
+// class zoned_time;
+//
+// zoned_time(string_view name, const local_time<Duration>& st, choose c);
+
+#include <chrono>
+#include <concepts>
+#include <cassert>
+
+#include "test_offset_time_zone.h"
+
+int main(int, char**) {
+  // Tests unique conversions. To make sure the test is does not depend on changes
+  // in the database it uses a time zone with a fixed offset.
----------------
ldionne wrote:

```suggestion
  // Tests unique conversions. To make sure the test does not depend on changes
  // in the database it uses a time zone with a fixed offset.
```

https://github.com/llvm/llvm-project/pull/95010


More information about the llvm-branch-commits mailing list