Skip to content
Snippets Groups Projects
Unverified Commit 44f9b397 authored by Shylock Hg's avatar Shylock Hg Committed by GitHub
Browse files

Initialize the timezone configuration (#363)


* Initialize the timezone configuration.

* Log the error when initialize failed.

Co-authored-by: default avatarcpw <13495049+CPWstatic@users.noreply.github.com>
parent 3b94b876
No related branches found
No related tags found
No related merge requests found
......@@ -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();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment