Debian/Ubuntu設置時區

Linux·小知識 · 04-01 · 74 人浏览

你可以通过以下命令设置时区为 Europe/Helsinki、纽约和上海:

  1. 设置时区为 Europe/Helsinki:
sudo timedatectl set-timezone Europe/Helsinki
  1. 设置时区为纽约(America/New_York):
sudo timedatectl set-timezone America/New_York
  1. 设置时区为上海(Asia/Shanghai):
sudo timedatectl set-timezone Asia/Shanghai

设置完成后,系统的时区就会相应地更新为你所选择的时区。你可以使用 timedatectl 命令验证设置是否已经生效:

timedatectl

该命令会显示当前的时间和时区设置。

本站立足于美利堅合衆國,請讀者自覺遵守當地法律!如有違規,本站不承擔任何法律責任! This site is based in the United States of America, readers are requested to abide by local laws! If there are any violations, this site does not bear any legal responsibility! Theme Jasmine by Kent Liao