1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:04:59 +00:00

Userland: Invoke tzset in applications that care about time zones

In most applications, we invoke tzset once at startup for now. Most of
these are short lived and don't need to know about time zone changes.

The exception is the ClockWidget in the taskbar. Here, we invoke tzset
each time we update the system time. This way, any time zone changes can
take effect immediately.
This commit is contained in:
Timothy Flynn 2022-01-24 16:12:19 -05:00 committed by Linus Groh
parent 010ec36d20
commit ede5c9548e
11 changed files with 33 additions and 1 deletions

View file

@ -29,6 +29,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
args_parser.add_option(print_rfc_5322, "Print date in RFC 5322 format", "rfc-5322", 'R');
args_parser.parse(arguments);
tzset();
if (set_date != nullptr) {
auto number = String(set_date).to_uint();