Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

Split the time zone database and time zone initialization. #450

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/daemons/MetaDaemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,13 @@ int main(int argc, char *argv[]) {
return EXIT_FAILURE;
}

// load the time zone data
status = nebula::time::Timezone::init();
if (!status.ok()) {
LOG(ERROR) << status;
return EXIT_FAILURE;
}

// Initialize the global timezone, it's only used for datetime type compute
// won't affect the process timezone.
status = nebula::time::Timezone::initializeGlobalTimezone();
Expand Down
7 changes: 7 additions & 0 deletions src/daemons/StorageDaemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,13 @@ int main(int argc, char *argv[]) {
return EXIT_FAILURE;
}

// load the time zone data
status = nebula::time::Timezone::init();
if (!status.ok()) {
LOG(ERROR) << status;
return EXIT_FAILURE;
}

// Initialize the global timezone, it's only used for datetime type compute
// won't affect the process timezone.
status = nebula::time::Timezone::initializeGlobalTimezone();
Expand Down