From ede5c9548e55d8216dba21ed431b9e53d085a248 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Mon, 24 Jan 2022 16:12:19 -0500 Subject: 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. --- Userland/Utilities/js.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Userland/Utilities/js.cpp') diff --git a/Userland/Utilities/js.cpp b/Userland/Utilities/js.cpp index c77c563f80..66bec4ccb7 100644 --- a/Userland/Utilities/js.cpp +++ b/Userland/Utilities/js.cpp @@ -68,6 +68,7 @@ #include #include #include +#include #include RefPtr vm; @@ -1287,6 +1288,8 @@ ErrorOr serenity_main(Main::Arguments arguments) args_parser.add_positional_argument(script_paths, "Path to script files", "scripts", Core::ArgsParser::Required::No); args_parser.parse(arguments); + tzset(); + bool syntax_highlight = !disable_syntax_highlight; vm = JS::VM::create(); -- cgit v1.2.3