mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:27:35 +00:00
Revert "Userland: Invoke tzset in apps that care about time zones"
This reverts most of commit ede5c9548e
.
The one change not reverted is ClockWidget.h, so that the taskbar clock
can continue to notice time zone changes.
This commit is contained in:
parent
6838333f76
commit
8599ee3049
10 changed files with 0 additions and 28 deletions
|
@ -14,7 +14,6 @@
|
|||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <LibMain/Main.h>
|
||||
#include <time.h>
|
||||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
|
@ -25,8 +24,6 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
TRY(Core::System::unveil("/res", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
tzset();
|
||||
|
||||
auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-analog-clock"));
|
||||
auto window = TRY(GUI::Window::try_create());
|
||||
window->set_title(Core::DateTime::now().to_string("%Y-%m-%d"));
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include <LibGUI/Icon.h>
|
||||
#include <LibGUI/TabWidget.h>
|
||||
#include <LibMain/Main.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
namespace Browser {
|
||||
|
@ -83,8 +82,6 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
TRY(Core::System::unveil("/tmp/portal/request", "rw"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
tzset();
|
||||
|
||||
auto app_icon = GUI::Icon::default_icon("app-browser");
|
||||
|
||||
Browser::g_home_url = Config::read_string("Browser", "Preferences", "Home", "file:///res/html/misc/welcome.html");
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include <LibGUI/Toolbar.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <LibMain/Main.h>
|
||||
#include <time.h>
|
||||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
|
@ -32,8 +31,6 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
TRY(Core::System::unveil("/res", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
tzset();
|
||||
|
||||
auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-calendar"));
|
||||
auto window = TRY(GUI::Window::try_create());
|
||||
window->set_title("Calendar");
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#include <RequestServer/HttpProtocol.h>
|
||||
#include <RequestServer/HttpsProtocol.h>
|
||||
#include <signal.h>
|
||||
#include <time.h>
|
||||
|
||||
ErrorOr<int> serenity_main(Main::Arguments)
|
||||
{
|
||||
|
@ -33,8 +32,6 @@ ErrorOr<int> serenity_main(Main::Arguments)
|
|||
TRY(Core::System::unveil("/etc/timezone", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
tzset();
|
||||
|
||||
[[maybe_unused]] auto gemini = make<RequestServer::GeminiProtocol>();
|
||||
[[maybe_unused]] auto http = make<RequestServer::HttpProtocol>();
|
||||
[[maybe_unused]] auto https = make<RequestServer::HttpsProtocol>();
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include <LibIPC/SingleServer.h>
|
||||
#include <LibMain/Main.h>
|
||||
#include <WebContent/ClientConnection.h>
|
||||
#include <time.h>
|
||||
|
||||
ErrorOr<int> serenity_main(Main::Arguments)
|
||||
{
|
||||
|
@ -23,8 +22,6 @@ ErrorOr<int> serenity_main(Main::Arguments)
|
|||
TRY(Core::System::unveil("/tmp/portal/websocket", "rw"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
tzset();
|
||||
|
||||
auto client = TRY(IPC::take_over_accepted_client_from_system_server<WebContent::ClientConnection>());
|
||||
return event_loop.exec();
|
||||
}
|
||||
|
|
|
@ -29,8 +29,6 @@ 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();
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include <LibCore/DateTime.h>
|
||||
#include <LibCore/System.h>
|
||||
#include <LibMain/Main.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
class DiscordianDate {
|
||||
|
@ -105,8 +104,6 @@ ErrorOr<int> serenity_main(Main::Arguments)
|
|||
{
|
||||
TRY(Core::System::pledge("stdio rpath"));
|
||||
|
||||
tzset();
|
||||
|
||||
auto date = Core::DateTime::now();
|
||||
outln("Today is {}", DiscordianDate(date).to_string());
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#include <LibMain/Main.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
class Quote {
|
||||
|
@ -88,8 +87,6 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
TRY(Core::System::unveil("/etc/timezone", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
tzset();
|
||||
|
||||
auto file_contents = file->read_all();
|
||||
auto json = TRY(JsonValue::from_string(file_contents));
|
||||
if (!json.is_array()) {
|
||||
|
|
|
@ -69,7 +69,6 @@
|
|||
#include <fcntl.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
RefPtr<JS::VM> vm;
|
||||
|
@ -1305,8 +1304,6 @@ 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();
|
||||
|
|
|
@ -25,8 +25,6 @@ ErrorOr<int> serenity_main(Main::Arguments)
|
|||
TRY(Core::System::unveil("/proc", "r"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
tzset();
|
||||
|
||||
auto file = TRY(Core::File::open("/var/run/utmp", Core::OpenMode::ReadOnly));
|
||||
auto json = TRY(JsonValue::from_string(file->read_all()));
|
||||
if (!json.is_object()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue