From: Caisking <3449750381@qq.com> Date: Wed, 26 Jun 2024 10:37:11 +0000 (+0800) Subject: 同步存储文件设计 X-Git-Tag: release_V1.2.70_20241020_135402~948^2~2^2~1^2~2 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=d16ff6274413f7c85e1bf69f4745e8916cb11438;p=mirrors%2FFD230.git 同步存储文件设计 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/heart_blood/health_service/health_service.cpp b/code/sdk/application/wearable/fd230app/nativeui/heart_blood/health_service/health_service.cpp index a0ce16690..1dfd7edfa 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/heart_blood/health_service/health_service.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/heart_blood/health_service/health_service.cpp @@ -6,6 +6,7 @@ #include #include #include "kv_store.h" +#include "custom_utils.h" namespace OHOS { @@ -13,12 +14,16 @@ namespace OHOS /*获取日期*/ std::string GetCurrentDate() { + char date[9]; + uapi_get_YYMMDD_Time(date, '\0'); + return std::string(date); +#if 0 time_t now = time(0); tm *ltm = localtime(&now); - char date[9]; // MM/DD/YYYY format strftime(date, sizeof(date), "%m%d%Y", ltm); // Use "%m%d%Y" for MMDDYYYY format return std::string(date); +#endif } // static char *JSON_F_buf=NULL; cJSON *heart_root = NULL;