Modification of the default time zone
The time zone support list can be viewed in frameworks/base/packages/SettingsLib/res/xml/timezones.xml.
Temporary modification method
-
System readable and writable
adb shell setprop persist.sys.root_access 3 adb root adb remount -
Modify the value of
persist.sys.timezonein the/system/build.propfile (Android10 and above:/vendor/build.prop)Asia/Shanghai:UTC+8
-
System restart
adb shell reboot
Code modification method
- Android7.1/Android10
- In the file
device/rockchip/CPU_TYPE/PRODUCT_TYPE/system.prop, modify the value ofpersist.sys.timezoneAsia/Shanghai:UTC+8
- In the file
- Android11 and above
- Add the following content in the
device/rockchip/CPU_TYPE/PRODUCT_TYPE/PRODUCT_TYPE.mkfile:
PRODUCT_PROPERTY_OVERRIDES += persist.sys.timezone=Asia/Shanghai - Add the following content in the
- Delete build.prop in the out directory
rm out/target/product/PRODUCT_TYPE/obj/ETC/system_build_prop_intermediates/build.prop

