https://www.garron.me/en/linux/set-time-date-timezone-ntp-linux-shell-gnome-command-line.html

Set time and date from the command linedate -s "19 APR 2012 11:14:00"

We'll see differences between hardware clock and system clock
hwclock --show

Let's set the hardware clock to local time:

hwclock --set --date="2012-04-19 16:45:05" --localtime

If you want to set it to UTC time use:

hwclock --set --date="2011-04-19 20:45:05"  --utc                  (toronto is using EDT in summary, EST in winter)

Set the timezone

To set the timezone of your system clock do the following:

cp /usr/share/zoneinfo/America/La_Paz /etc/localtime

让history命令显示日期和时间https://linux.cn/article-9253-1.html

Set Time, Date Timezone in Linux from Command Line or Gnome | Use ntp的更多相关文章

  1. 《The Linux Command Line》 读书笔记01 基本命令介绍

    <The Linux Command Line> 读书笔记01 基本命令介绍 1. What is the Shell? The Shell is a program that takes ...

  2. Linux / Unix Command: bunzip2--reference

    http://linux.about.com/library/cmd/blcmdl1_bunzip2.htm NAME bzip2, bunzip2 - a block-sorting file co ...

  3. Linux command line exercises for NGS data processing

    by Umer Zeeshan Ijaz The purpose of this tutorial is to introduce students to the frequently used to ...

  4. Date, TimeZone, MongoDB, java中date的时区问题

    打印new Date(),Fri Aug 12 13:37:51 CST 2016. 显示Asia/Shanghai的时区,但是date toString 的时区简写却是CST.更坑爹的是,Googl ...

  5. Linux Command Line 笔记(1)

    Yunduan CUI graphical user interfaces make easy tasks easy, while command line interfaces make diffi ...

  6. 《The Linux Command Line》 读书笔记04 Linux用户以及权限相关命令

    Linux用户以及权限相关命令 查看身份 id:Display user identity. 这个命令的输出会显示uid,gid和用户所属的组. uid即user ID,这是账户创建时被赋予的. gi ...

  7. 《The Linux Command Line》 读书笔记02 关于命令的命令

    <The Linux Command Line> 读书笔记02 关于命令的命令 命令的四种类型 type type—Indicate how a command name is inter ...

  8. Linux Command Line Basics

    Most of this note comes from the Beginning the Linux Command Line, Second Edition by Sander van Vugt ...

  9. Linux:-bash: ***: command not found

    Linux:-bash: ***: command not found,系统很多命令都用不了,均提示没有此命令. 突然之间linux很多命令都用不了,均提示没有此命令. 这应该是系统环境变量出现了问题 ...

随机推荐

  1. bzoj2120 数颜色——带修莫队

    题目:https://www.lydsy.com/JudgeOnline/problem.php?id=2120 带修改的莫队: 用结构体存下修改和询问,排好序保证时间后就全局移动修改即可: 参考了T ...

  2. codeforces round #424 div2

    A 暴力查询,分三段查就可以了 #include<bits/stdc++.h> using namespace std; ; int n, pos; int a[N]; int main( ...

  3. Java 解析Json数据

    Json格式字符串{success:0,errorMsg:"错误消息",data:{total:"总记录数",rows:[{id:"任务ID" ...

  4. 【BZOJ2693】jzptab & 【BZOJ2154】Crash的数字表格

    题目 弱化版题目的传送门([BZOJ2154]Crash的数字表格) 加强版题目的传送门([BZOJ2693]jzptab) 思路&解法 题目是要求: \(\sum\limits_{i = 1 ...

  5. 原生JS---6

    原生js学习笔记6——事件 事件对象 鼠标事件 event.clientX在可视区中,鼠标点击的x坐标 event.clientY在可视区中,鼠标点击的y坐标 示例: <!DOCTYPE htm ...

  6. JavaScript学习杂记

    1.DOM层级:document(document) --> doctype,documentElement(html) --> head,body(body). 2.offset, cl ...

  7. Python 33(1) UDP协议 数据报协议 socketsever模块

    一:基于UDP协议通信的套接字  基于UDP协议 只要是套接字,在开发的过程中一定要有服务端和客户端. UDP协议说的就是数据报协议,也就是说,基于UDP协议来发数据,每发一个数据,都是带有报头的数据 ...

  8. ROS-TF-Time

    前言:如何在特定时间进行转换.让第二只乌龟去第一只乌龟在5秒前的地方. 参考自:http://wiki.ros.org/tf/Tutorials/Time%20travel%20with%20tf%2 ...

  9. 【Arduino】LCD 1602 转接板 的默认接线

    原来的1602屏需要7个IO口才能驱动起来LCD 1602转接板可以帮你省5个IO口. 在Arduino中,LCD 1602 转接板可以使用函数库LiquidCrystal_I2C1602: 该函数的 ...

  10. 【Oracle】闪回表

    语法: FLASHBACK TABLE [ schema. ] table [, [ schema. ] table ]... TO { { { SCN | TIMESTAMP } expr| RES ...