"CentOS" localtime

Source: Internet
Author: User
Tags time zones

[Email protected] etc]# Ls-al localtime*

lrwxrwxrwx. 1 root root 38 November 03:32 localtime. /usr/share/zoneinfo/america/new_york

[[Email protected] etc]# Date

Saturday, March 12, 2016 00:00:57 EST

[Email protected] etc]#


Ln-s. /usr/share/zoneinfo/asia/shanghai localtime


[Email protected] etc]# RM-RF localtime

[Email protected] etc]# ls-s. /usr/share/zoneinfo/a

africa/antarctica/asia/australia/

america/arctic/atlantic/

[Email protected] etc]# ls-s. /usr/share/zoneinfo/a

africa/antarctica/asia/australia/

america/arctic/atlantic/

[Email protected] etc]# ls-s. /usr/share/zoneinfo/asia/shanghai localtime

LS: Unable to access localtime: No file or directory

4.. /usr/share/zoneinfo/asia/shanghai

[Email protected] etc]# ln-s. /usr/share/zoneinfo/asia/shanghai localtime

[Email protected] etc]# ls-al localtime* lrwxrwxrwx. 1 root root 35 March 13:02 localtime. /usr/share/zoneinfo/asia/shanghai

[Email protected] etc]#



[Email protected] sysconfig]# Timedatectl

Local time: Six 2016-03-12 05:10:37 UTC

Universal time: Six 2016-03-12 05:10:37 UTC

RTC time: 62,016-03-12 05:10:37

Time Zone:asia/shanghai (UTC, +0000)

NTP Enabled:yes

NTP Synchronized:yes

RTC in local Tz:no

DST active:n/a

[Email protected] sysconfig]#



Timedatectl Set-timezone Asia/shanghai


[Email protected] sysconfig]# Timedatectl--help

Timedatectl [OPTIONS ...] COMMAND ...


Query or change system time and date settings.


-H--help Show this help message

--version Show Package version

--no-pager do not pipe output to a pager

--no-ask-password don't prompt for password

-H--host=[[email protected]]host Operate on remote host

-M--machine=container Operate on local CONTAINER

--adjust-system-clock adjust system clock when changing local RTC mode


Commands:

Status Show Current time settings

Set-time Time Set system time

Set-timezone Zone Set system time zone

List-timezones Show known time zones

SET-LOCAL-RTC BOOL Control Whether RTC is in local time

SET-NTP BOOL Control whether NTP is enabled

[Email protected] sysconfig]#





"CentOS" localtime

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.