• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 The Chromium Authors. All rights reserved.
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 "base/android/jni_android.h"
8 #include "base/android/jni_string.h"
9 #include "base/strings/string16.h"
10 #include "jni/TimezoneUtils_jni.h"
11 
12 namespace base {
13 namespace android {
14 
GetDefaultTimeZoneId()15 base::string16 GetDefaultTimeZoneId() {
16   JNIEnv* env = base::android::AttachCurrentThread();
17   ScopedJavaLocalRef<jstring> timezone_id =
18       Java_TimezoneUtils_getDefaultTimeZoneId(env);
19   return ConvertJavaStringToUTF16(timezone_id);
20 }
21 
22 }  // namespace android
23 }  // namespace base
24