Created
September 23, 2016 00:55
-
-
Save tkuchiki/afd394fffdfc0131e36f86ad5563ee4c to your computer and use it in GitHub Desktop.
localtime の timezone を変更する
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo 'ZONE="Asia/Tokyo"' > /etc/sysconfig/clock | |
if grep "amazon linux" -iqs /etc/system-release; then | |
# for Amazon Linux | |
rm -f /etc/localtime | |
ln -s /usr/share/zoneinfo/Japan /etc/localtime | |
else | |
# for CentOS | |
/usr/sbin/tzdata-update | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment