gcc/libstdc++-v3/testsuite
Jonathan Wakely 4abd5bc600 libstdc++: Make std::chrono::current_zone() default to UTC
This is consistent with the behaviour of glibc, which assumes UTC when
/etc/localtime and TZ do not identify a valid time zone. The fallback
tzdb used when no valid tzdata exists always contains the UTC zone, so
this change means we have a valid tzdb and valid current zone even in
the degenerate case.

With this default we no longer need the AIX-specific kluge to try and
identify TZ values specifying a 0-offset zone. We can just use the UTC
default for those, as it has the same effect.

It's still possible for chrono::current_zone() to fail, because the user
could have provided a custom tzdata.zi file which doesn't contain the
UTC time zone, so the "UTC" default would fail to find a valid zone, and
throw an exception. That's just user error, they should not provide bad
data and expect reasonable behaviour.

libstdc++-v3/ChangeLog:

	* src/c++20/tzdb.cc (chrono::tzdb::current_zone()) Use "UTC" if
	current time zone cannot be determined.
	* testsuite/std/time/tzdb/1.cc: Remove conditions based on
	HAVE_TZDB macro and test all members unconditionally.
2023-03-01 21:26:08 +00:00
..
17_intro [libstdc++] [testsuite] intro/names.cc: undef func on vxw7krn 2023-02-22 14:35:13 -03:00
18_support Update copyright years. 2023-01-16 11:52:17 +01:00
19_diagnostics Update copyright years. 2023-01-16 11:52:17 +01:00
20_util libstdc++: Fix uses_allocator_construction_args for pair<T&&, U&&> [PR108952] 2023-02-28 09:49:11 +00:00
21_strings libstdc++: Optimize basic_string move assignment 2023-02-04 14:03:54 +01:00
22_locale libstdc++: testsuite: Simplify codecvt_unicode 2023-01-18 18:53:11 +00:00
23_containers libstdc++: Use dg-bogus in new test [PR108554] 2023-01-27 15:33:00 +00:00
24_iterators Update copyright years. 2023-01-16 11:52:17 +01:00
25_algorithms libstdc++: Do not use memmove for 1-element ranges [PR108846] 2023-02-28 09:49:11 +00:00
26_numerics Update copyright years. 2023-01-16 11:52:17 +01:00
27_io [libstdc++] xfail noreplace tests on vxworks 2023-02-22 14:35:15 -03:00
28_regex Update copyright years. 2023-01-16 11:52:17 +01:00
29_atomics libstdc++: Add missing free functions for atomic_flag [PR103934] 2023-02-13 17:46:59 -08:00
30_threads Update copyright years. 2023-01-16 11:52:17 +01:00
abi Update copyright years. 2023-01-16 11:52:17 +01:00
backward Update copyright years. 2023-01-16 11:52:17 +01:00
config Update copyright years. 2023-01-16 11:52:17 +01:00
data
decimal Update copyright years. 2023-01-16 11:52:17 +01:00
experimental libstdc++: Make net::ip::basic_endpoint comparisons constexpr 2023-02-24 14:23:36 +00:00
ext Update copyright years. 2023-01-16 11:52:17 +01:00
lib Update copyright years. 2023-01-16 11:52:17 +01:00
libstdc++-abi Update copyright years. 2023-01-16 11:52:17 +01:00
libstdc++-dg Update copyright years. 2023-01-16 11:52:17 +01:00
libstdc++-prettyprinters Update copyright years. 2023-01-16 11:52:17 +01:00
libstdc++-xmethods Update copyright years. 2023-01-16 11:52:17 +01:00
performance Update copyright years. 2023-01-16 11:52:17 +01:00
special_functions Update copyright years. 2023-01-16 11:52:17 +01:00
std libstdc++: Make std::chrono::current_zone() default to UTC 2023-03-01 21:26:08 +00:00
tr1 Update copyright years. 2023-01-16 11:52:17 +01:00
tr2 Update copyright years. 2023-01-16 11:52:17 +01:00
util Update copyright years. 2023-01-16 11:52:17 +01:00
Makefile.am Update copyright years. 2023-01-16 11:52:17 +01:00
Makefile.in libstdc++: Don't use gstdint.h anymore 2022-10-29 00:55:42 +01:00