Searched refs:iso8601Str (Results 1 - 3 of 3) sorted by relevance
/foundation/multimedia/player_framework/test/unittest/utils_test/ |
H A D | time_format_utils_unit_test.cpp | 44 std::string iso8601Str = "2023-01-01T01:01:01Z";
in HWTEST_F() local 46 EXPECT_EQ(TimeFormatUtils::FormatDateTimeByTimeZone(iso8601Str).substr(0, 7), expected);
in HWTEST_F() 51 std::string iso8601Str = "2023-01-01 01:01:01";
in HWTEST_F() local 52 EXPECT_EQ(TimeFormatUtils::FormatDateTimeByTimeZone(iso8601Str), iso8601Str);
in HWTEST_F() local 57 std::string iso8601Str = "2023-01-01T23:01:01";
in HWTEST_F() local 59 EXPECT_EQ(TimeFormatUtils::FormatDateTimeByTimeZone(iso8601Str).substr(0, 7), expected);
in HWTEST_F() 64 std::string iso8601Str = "2023-01-01T24:01:01Z";
in HWTEST_F() local 65 EXPECT_EQ(TimeFormatUtils::FormatDateTimeByTimeZone(iso8601Str), iso8601Str);
in HWTEST_F() local [all...] |
/foundation/multimedia/player_framework/services/utils/ |
H A D | time_format_utils.cpp | 34 std::string TimeFormatUtils::FormatDateTimeByTimeZone(const std::string &iso8601Str) in FormatDateTimeByTimeZone() argument 38 if (!std::regex_match(iso8601Str, match, pattern)) { in FormatDateTimeByTimeZone() 39 return iso8601Str; // not standard ISO8601 type string in FormatDateTimeByTimeZone() 42 std::istringstream iss(iso8601Str); in FormatDateTimeByTimeZone() 45 return iso8601Str; // cant prase time in FormatDateTimeByTimeZone() 51 return iso8601Str; in FormatDateTimeByTimeZone() 53 uint32_t length = iso8601Str.length(); in FormatDateTimeByTimeZone() 55 if (iso8601Str.substr(length - 1, length).compare("Z") != 0) { in FormatDateTimeByTimeZone() 56 int mins = std::stoi(iso8601Str.substr(length - 2, 2)); in FormatDateTimeByTimeZone() 57 int hours = std::stoi(iso8601Str in FormatDateTimeByTimeZone() [all...] |
/foundation/multimedia/player_framework/services/utils/include/ |
H A D | time_format_utils.h | 32 static std::string __attribute__((visibility("default"))) FormatDateTimeByTimeZone(const std::string &iso8601Str);
|
Completed in 2 milliseconds