| 85 | }; |
| 86 | |
| 87 | void TimestampFunctions::FromUtcAndToUtcPrepare(FunctionContext* context, |
| 88 | FunctionContext::FunctionStateScope scope) { |
| 89 | if (scope != FunctionContext::FRAGMENT_LOCAL) return; |
| 90 | const Timezone* timezone = nullptr; |
| 91 | if (context->IsArgConstant(1)) { |
| 92 | StringVal tz_string_val = *reinterpret_cast<StringVal*>(context->GetConstantArg(1)); |
| 93 | const StringValue& tz_string_value = StringValue::FromStringVal(tz_string_val); |
| 94 | timezone = TimezoneDatabase::FindTimezone( |
| 95 | string(tz_string_value.Ptr(), tz_string_value.Len())); |
| 96 | } |
| 97 | context->SetFunctionState(scope, (void *)(timezone)); |
| 98 | } |
| 99 | |
| 100 | const Timezone* GetTimezone(FunctionContext* context, |
| 101 | const StringValue& tz_string_value) { |
nothing calls this directly
no test coverage detected