time
- How to sync NTP time with chrony
- How to sync NTP time with systemd-timesyncd
- ntpdate
- timezone
- Set server time PST/PDT
- Determine the Default Time Zone on Linux
Time stamp in Bash Script
1 |
TIME_STAMP="$(date +%Y%m%d-%H%M%S)" |
for timestamp like 2020-01-23 15:12:45, use
1 |
TIME_STAMP="$(date "+%Y-%m-%d %H:%M:%S")" |
For file name
1 |
date +"%Y-%m-%d-%H-%M-%S" |
Time stamp in PHP
1 |
$now = date("Y-m-d-h:i:s"); |
Taking backup
1 |
mysqldump -u root -p'mv9wCAcDE3CnBV' serverok_wp > ~/serverok_wp-`date +"%Y-%m-%d-%H-%M-%S"`.sql |