MCPcopy Create free account
hub / github.com/apache/arrow / getTimeZone

Method getTimeZone

matlab/src/cpp/arrow/matlab/type/proxy/timestamp_type.cc:60–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60void TimestampType::getTimeZone(libmexclass::proxy::method::Context& context) {
61 namespace mda = ::matlab::data;
62 mda::ArrayFactory factory;
63
64 auto timestamp_type = std::static_pointer_cast<arrow::TimestampType>(data_type);
65 const auto timezone_utf8 = timestamp_type->timezone();
66 MATLAB_ASSIGN_OR_ERROR_WITH_CONTEXT(const auto timezone_utf16,
67 arrow::util::UTF8StringToUTF16(timezone_utf8),
68 context, error::UNICODE_CONVERSION_ERROR_ID);
69 auto timezone_mda = factory.createScalar(timezone_utf16);
70 context.outputs[0] = timezone_mda;
71}
72
73void TimestampType::getTimeUnit(libmexclass::proxy::method::Context& context) {
74 namespace mda = ::matlab::data;

Callers

nothing calls this directly

Calls 1

timezoneMethod · 0.80

Tested by

no test coverage detected