当前位置:   article > 正文

android 11 修改时区(上海)& NTP服务器设置_android 11 默认时区

android 11 默认时区

一、NTP服务器设置

代码位置

alps/device/mediatek/system/common/overlay/ntp/frameworks/base/core/res/res/values/config.xml

alps/frameworks/base/core/res/res/values/config.xml

具体代码

diff --git a/alps/device/mediatek/system/common/overlay/ntp/frameworks/base/core/res/res/values/config.xml b/alps/device/mediatek/system/common/overlay/ntp/frameworks/base/core/res/res/values/config.xml
old mode 100644 (file)
new mode 100755 (executable)
index 84e5add..e58f023
--- a/alps/device/mediatek/system/common/overlay/ntp/frameworks/base/core/res/res/values/config.xml
+++ b/alps/device/mediatek/system/common/overlay/ntp/frameworks/base/core/res/res/values/config.xml
@@ -37,5 +37,5 @@
 -->
 <resources>
     <!-- Remote server that can provide NTP responses. -->
-    <string translatable="false" name="config_ntpServer">pool.ntp.org</string>
+    <string translatable="false" name="config_ntpServer">cn.pool.ntp.org</string>
 </resources>
\ No newline at end of file

diff --git a/alps/frameworks/base/core/res/res/values/config.xml b/alps/frameworks/base/core/res/res/values/config.xml
old mode 100644 (file)
new mode 100755 (executable)
index 39d20bb..c7aa0d2
--- a/alps/frameworks/base/core/res/res/values/config.xml
+++ b/alps/frameworks/base/core/res/res/values/config.xml
@@ -2030,7 +2030,7 @@
     <bool name="config_actionMenuItemAllCaps">true</bool>
 
     <!-- Remote server that can provide NTP responses. -->
-    <string translatable="false" name="config_ntpServer">time.android.com</string>
+    <string translatable="false" name="config_ntpServer">cn.pool.ntp.org</string>
     <!-- Normal polling frequency in milliseconds -->
     <integer name="config_ntpPollingInterval">86400000</integer>
     <!-- Try-again polling interval in milliseconds, in case the network request failed -->

代码分析

更改系统时间NTP服务器地址

二、修改为上海时区

代码位置

a/alps/device/mediateksample/w869_cn/custom.prop

具体代码

diff --git a/alps/device/mediateksample/w869_cn/custom.prop b/alps/device/mediateksample/w869_cn/custom.prop
index 36aa039..11af18f 100755 (executable)
--- a/alps/device/mediateksample/w869_cn/custom.prop
+++ b/alps/device/mediateksample/w869_cn/custom.prop
@@ -24,4 +24,6 @@ ro.vendor.xw.lyz_headset=0
 ro.vendor.xw.lyz_backlight=0
 ro.vendor.xw.lyz_memory=0
 ro.vendor.xw.lyz_sim_card=0
-ro.vendor.xw.lyz_storage_equipment=0
\ No newline at end of file
+ro.vendor.xw.lyz_storage_equipment=0
+
+persist.sys.timezone=Asia/Shanghai

代码分析

添加上海时区

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/797939
推荐阅读
相关标签
  

闽ICP备14008679号