1 // Copyright 2017 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "base/android/timezone_utils.h" 6 7 #include <string> 8 9 #include "base/android/jni_android.h" 10 #include "base/android/jni_string.h" 11 12 // Must come after all headers that specialize FromJniType() / ToJniType(). 13 #include "base/base_jni/TimezoneUtils_jni.h" 14 15 namespace base { 16 namespace android { 17 GetDefaultTimeZoneId()18std::u16string GetDefaultTimeZoneId() { 19 JNIEnv* env = base::android::AttachCurrentThread(); 20 ScopedJavaLocalRef<jstring> timezone_id = 21 Java_TimezoneUtils_getDefaultTimeZoneId(env); 22 return ConvertJavaStringToUTF16(timezone_id); 23 } 24 25 } // namespace android 26 } // namespace base 27