diff options
author | Timothy Flynn <trflynn89@pm.me> | 2022-01-24 16:12:19 -0500 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-01-25 18:39:36 +0000 |
commit | ede5c9548e55d8216dba21ed431b9e53d085a248 (patch) | |
tree | 41a8a8652978d9744dc0a99347eaacd1d054a00a /Userland/Utilities/js.cpp | |
parent | 010ec36d20e6c2d97fd6fb4e6bd7f8582f123c57 (diff) | |
download | serenity-ede5c9548e55d8216dba21ed431b9e53d085a248.zip |
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.
Diffstat (limited to 'Userland/Utilities/js.cpp')
-rw-r--r-- | Userland/Utilities/js.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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 <fcntl.h> #include <signal.h> #include <stdio.h> +#include <time.h> #include <unistd.h> RefPtr<JS::VM> vm; @@ -1287,6 +1288,8 @@ ErrorOr<int> 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(); |