Browse Source

LibMain: Invoke tzset in LibMain so all apps can have time zone info

Rather than finding apps that benefit from time zone awareness one-by-
one, and calling tzset in their serenity_main, let's do it in LibMain.
Timothy Flynn 3 years ago
parent
commit
6838333f76
1 changed files with 3 additions and 0 deletions
  1. 3 0
      Userland/Libraries/LibMain/Main.cpp

+ 3 - 0
Userland/Libraries/LibMain/Main.cpp

@@ -9,9 +9,12 @@
 #include <AK/Vector.h>
 #include <LibMain/Main.h>
 #include <string.h>
+#include <time.h>
 
 int main(int argc, char** argv)
 {
+    tzset();
+
     Vector<StringView> arguments;
     arguments.ensure_capacity(argc);
     for (int i = 0; i < argc; ++i)