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

Commit

Permalink
Fit the modification of expose time utils. (#505)
Browse files Browse the repository at this point in the history
* Fit the modification of expose time utils.

* Fit move some methods to TimeConversion.
  • Loading branch information
Shylock-Hg authored Jun 30, 2021
1 parent d246f54 commit 84bd2f0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/daemons/MetaDaemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "common/hdfs/HdfsHelper.h"
#include "common/hdfs/HdfsCommandHelper.h"
#include "common/thread/GenericThreadPool.h"
#include "common/time/TimeUtils.h"
#include "common/time/TimezoneInfo.h"
#include "common/version/Version.h"
#include <thrift/lib/cpp2/server/ThriftServer.h>
#include "kvstore/PartManager.h"
Expand Down Expand Up @@ -302,7 +302,7 @@ int main(int argc, char *argv[]) {

// Initialize the global timezone, it's only used for datetime type compute
// won't affect the process timezone.
status = nebula::time::TimeUtils::initializeGlobalTimezone();
status = nebula::time::Timezone::initializeGlobalTimezone();
if (!status.ok()) {
LOG(ERROR) << status;
return EXIT_FAILURE;
Expand Down
4 changes: 2 additions & 2 deletions src/daemons/StorageDaemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "common/base/SignalHandler.h"
#include "common/network/NetworkUtils.h"
#include "common/process/ProcessUtils.h"
#include "common/time/TimeUtils.h"
#include "common/time/TimezoneInfo.h"
#include "common/version/Version.h"
#include "storage/StorageServer.h"
#include <thrift/lib/cpp2/server/ThriftServer.h>
Expand Down Expand Up @@ -117,7 +117,7 @@ int main(int argc, char *argv[]) {

// Initialize the global timezone, it's only used for datetime type compute
// won't affect the process timezone.
status = nebula::time::TimeUtils::initializeGlobalTimezone();
status = nebula::time::Timezone::initializeGlobalTimezone();
if (!status.ok()) {
LOG(ERROR) << status;
return EXIT_FAILURE;
Expand Down
2 changes: 1 addition & 1 deletion src/tools/meta-dump/MetaDumpTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class MetaDumper {
auto info = HostInfo::decode(val);
auto role = apache::thrift::util::enumNameSafe(info.role_);
auto time =
time::TimeUtils::unixSecondsToDateTime(info.lastHBTimeInMilliSec_ / 1000);
time::TimeConversion::unixSecondsToDateTime(info.lastHBTimeInMilliSec_ / 1000);
LOG(INFO) << folly::sformat("host addr: {}, role: {}, last hb time: {}",
host.toString(),
role,
Expand Down

0 comments on commit 84bd2f0

Please sign in to comment.