Skip to content

Commit

Permalink
update(linux-time): UTC/local time of linux
Browse files Browse the repository at this point in the history
issue #104
  • Loading branch information
sabertazimi committed Dec 6, 2018
1 parent c42e1dd commit 3eac78d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
26 changes: 26 additions & 0 deletions programming/linux/linuxBasicNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@
- [Driver Command](#driver-command)
- [Touchpad Synaptics](#touchpad-synaptics)
- [并行命令](#并行命令)
- [Other Command](#other-command)
- [Time](#time)
- [Shell编程](#shell编程)
- [Warings](#warings)
- [文件重定向](#文件重定向)
Expand Down Expand Up @@ -992,6 +994,30 @@ synclient TouchpadOff=0

> e.g ls && echo yes >> .log || echo no >> .log
### Other Command

#### Time

```bash
date
```

change ntp (Network Time Protocol) time

```bash
sudo apt-get install ntpdate
sudo iptables -A OUTPUT -p udp --dport 123 -j ACCEPT
sudo iptables -A INPUT -p udp --sport 123 -j ACCEPT
sudo ntpdate time.windows.com
sudo hwclock --localtime --systohc
```

use local time (not UTC time)

```bash
sudo timedatectl set-local-rtc 1
```

## Shell编程

### Warings
Expand Down
3 changes: 2 additions & 1 deletion programming/tools/vim/vimBasicNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@
- [git](#git)
- [Documentation](#documentation)
- [Error](#error)
- [Swap Backup File](#swap-backup-file)
- [Error Encoding](#error-encoding)

<!-- /TOC -->

Expand Down Expand Up @@ -936,4 +938,3 @@ set enc=utf8
set fencs=utf8,gbk,gb2312,gb18030
set termencoding=utf-8
```

0 comments on commit 3eac78d

Please sign in to comment.