MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / GetDate

Function GetDate

eval/public/extension_func_registrar.cc:62–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62CelValue GetDate(Arena* arena, absl::Time time_stamp,
63 absl::string_view time_zone) {
64 absl::TimeZone time_zone_tz;
65 // convert timezone from string to TimeZone
66 if (!absl::LoadTimeZone(time_zone, &time_zone_tz)) {
67 return CreateErrorValue(arena, "String to Timezone conversion failed",
68 absl::StatusCode::kInvalidArgument);
69 }
70 return GetDateTz(arena, time_stamp, time_zone_tz);
71}
72
73CelValue GetDateUTC(Arena* arena, absl::Time time_stamp) {
74 absl::TimeZone time_zone = absl::UTCTimeZone();

Callers 1

Calls 2

CreateErrorValueFunction · 0.85
GetDateTzFunction · 0.85

Tested by

no test coverage detected