Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    分享嵌入式系统修改时区的方法

    其它全志芯片讨论区
    时区 timezone
    2
    3
    1319
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • U
      ubuntu LV 7 last edited by whycan

      运行中的系统,执行:

      export TZ='Asia/Shanghai'
      

      然后

      # date
      Mon Dec  6 10:11:28 CST 2021
      

      时区就变更为北京时间了。

      1 Reply Last reply Reply Quote Share 0
      • U
        ubuntu LV 7 last edited by

        编译的时候把 buildroot 的配置:

        BR2_TARGET_LOCALTIME="Etc/UTC"
        

        修改为:

        BR2_TARGET_LOCALTIME="Asia/Shanghai"
        

        这样开机就是北京时间,不用执行任何命令。

        1 Reply Last reply Reply Quote Share 0
        • aldfaaa
          whycan矿工-小叶 LV 7 last edited by

          export TZ=CST-8

          1 Reply Last reply Reply Quote Share 0
          • 1 / 1
          • First post
            Last post

          Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

          行为准则 | 用户协议 | 隐私权政策