diff --git a/src/daemons/GraphDaemon.cpp b/src/daemons/GraphDaemon.cpp index f6c5e012df5312151a90b7138cfb02a87bbf60d1..63daa44fb8e6b6eedc8baceebd44bec0ea64a4e4 100644 --- a/src/daemons/GraphDaemon.cpp +++ b/src/daemons/GraphDaemon.cpp @@ -17,6 +17,7 @@ #include "service/GraphService.h" #include "service/GraphFlags.h" #include "common/webservice/WebService.h" +#include "common/time/TimeUtils.h" using nebula::Status; using nebula::ProcessUtils; @@ -93,6 +94,14 @@ int main(int argc, char *argv[]) { localIP = std::move(result).value(); } + // Initialize the global timezone, it's only used for datetime type compute + // won't affect the process timezone. + status = nebula::time::TimeUtils::initializeGlobalTimezone(); + if (!status.ok()) { + LOG(ERROR) << status; + return EXIT_FAILURE; + } + LOG(INFO) << "Starting Graph HTTP Service"; auto webSvc = std::make_unique<nebula::WebService>(); status = webSvc->start();