How to set the time zone in Amazon EC2?

后端 未结 11 1435
迷失自我
迷失自我 2020-12-22 19:33

I want to change the time zone set in my Amazon EC2 instance running Ubuntu Linux to local time?

My Question

How to change the time zone in

11条回答
  •  伪装坚强ぢ
    2020-12-22 19:59

    NOTE: This refers to a linux box (debian in my instance) should be used under your AWS launch configurations "User Data".

    If you're planning to set the TIMEZONE on instance boot use below (works like a charm) use you're own Country/City instead of "Australia/Sydney".

    #!/bin/bash
    
    /bin/rm -f /etc/localtime; /bin/ln -s /usr/share/zoneinfo/Australia/Sydney /etc/localtime
    

提交回复
热议问题