Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ZoneVariant a closed, non-exhaustive enum #5760

Merged
merged 5 commits into from
Nov 4, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix
  • Loading branch information
robertbastian committed Nov 3, 2024
commit 026b3507cec899a749771510c676bd4daae43ac5
2 changes: 1 addition & 1 deletion tutorials/cpp/datetime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ int main() {
return 1;
}
time_zone->set_local_time(*date.get());
time_zone->try_set_zone_variant("dt");
time_zone->set_daylight_time();

std::unique_ptr<GregorianZonedDateTimeFormatter> gzdtf = GregorianZonedDateTimeFormatter::create_with_length(*dp.get(), *locale.get(), DateTimeLength::Long).ok().value();
out = gzdtf->format_iso_datetime_with_custom_time_zone(*date.get(), *time_zone.get()).ok().value();
Expand Down