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

Function GetTimeOfDayTz

eval/public/extension_func_registrar.cc:78–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78CelValue GetTimeOfDayTz(Arena* arena, absl::Time time_stamp,
79 absl::TimeZone time_zone) {
80 absl::CivilSecond date_civil_time =
81 absl::ToCivilSecond(time_stamp, time_zone);
82 google::type::TimeOfDay* tod_message =
83 Arena::Create<google::type::TimeOfDay>(arena);
84
85 tod_message->set_seconds(date_civil_time.second());
86 tod_message->set_minutes(date_civil_time.minute());
87 tod_message->set_hours(date_civil_time.hour());
88 // transform into celvalue for return
89
90 return CelProtoWrapper::CreateMessage(tod_message, arena);
91}
92
93CelValue GetTimeOfDay(Arena* arena, absl::Time time_stamp,
94 absl::string_view time_zone) {

Callers 2

GetTimeOfDayFunction · 0.85
GetTimeOfDayUTCFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected