Skip to main content

Changing the Time Zone on Amazon Linux Ec2 Instance

Amazon Linux instances are set to the UTC (Coordinated Universal Time) time zone by default, but you may wish to change the time on an instance to the local time or to another time zone in your network.
Important
These procedures are intended for use with Amazon Linux. For more information about other distributions, see their specific documentation.
To change the time zone on an instance
  1. Identify the time zone to use on the instance. The /usr/share/zoneinfo directory contains a hierarchy of time zone data files. Browse the directory structure at that location to find a file for your time zone.
    [ec2-user ~]$ ls /usr/share/zoneinfo Africa Chile GB Indian Mideast posixrules US America CST6CDT GB-Eire Iran MST PRC UTC Antarctica Cuba GMT iso3166.tab MST7MDT PST8PDT WET Arctic EET GMT0 Israel Navajo right W-SU ...
    Some of the entries at this location are directories (such as America), and these directories contain time zone files for specific cities. Find your city (or a city in your time zone) to use for the instance. In this example, you can use the time zone file for Los Angeles, /usr/share/zoneinfo/America/Los_Angeles.
  2. Update the /etc/sysconfig/clock file with the new time zone.
    1. Open the /etc/sysconfig/clock file with your favorite text editor (such as vim or nano). You need to use sudo with your editor command because /etc/sysconfig/clock is owned by root.
    2. Locate the ZONE entry, and change it to the time zone file (omitting the /usr/share/zoneinfo section of the path). For example, to change to the Los Angeles time zone, change the ZONE entry to the following:
      ZONE="America/Los_Angeles"
      Note
      Do not change the UTC=true entry to another value. This entry is for the hardware clock, and does not need to be adjusted when you're setting a different time zone on your instance.
    3. Save the file and exit the text editor.
  3. Create a symbolic link between /etc/localtime and your time zone file so that the instance finds the time zone file when it references local time information.
    [ec2-user ~]$ sudo ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
  4. Reboot the system to pick up the new time zone information in all services and applications.
    [ec2-user ~]$ sudo reboot


Reference Link.

Comments

  1. Indian Web Designers fast-growing website designing company in Delhi intend to create a website on your request according to your specifications.
    Web Design Company in Delhi
    Digital Marketing company in india

    ReplyDelete
  2. Energy Saving Sensors Made by Highly Components Pvt. Ltd. - Which is the leading company in the field of Security related products in India. The company has achieved an unrivalled position in the market by introducing PIR Motion Sensors for automatic control of lights apart from other Security Sensors. Energy Saving Sensors in New Delhi
    Smoke Alarm Sensor

    ReplyDelete
  3. Changing time zone on Amazon can be frustrating that is why I am here now looking for professional and wise assistance.

    ReplyDelete

Post a comment

Popular posts from this blog

Digital Marketing

What actually is Digital Marketing?
This post will help you understand the insights of Digital MarketingWhat is Digital Marketing?Digital Marketing is an integral part of the overall marketing strategies of any business. It basically covers the advertisement of products/services/business/brand via digital channels. The digital channels could be of any type like websites, search engines, social media, emails, SMS, and MMS. In case if you're using all these digital channels for the marketing, make sure to have all the statistics & workflow of your campaigns via marketing automation. What are the types of digital marketing?Well, there are 6 core digital marketing types: Search Engine Optimization (SEO): Search Engine Optimization is nothing but a long-term process of improving your website rankings on search engine results pages (SERPs), which in turn has a wide range of tactics & strategies to implement. Although there is no specific method or a  specific formula with which an …

Android & iOS Application Development For Dummies

App Development ProcessApp Development Process explained in the most simplified way This tutorial will guide all the beginners how an app is developed from scratch and will help in letting the beginners know how the process works.Phase-1 (Conceptualization): Even a concept or an idea starts with an approach to introduce something after acknowledging the inkling of amiss or what's missing in the existing market. Developing the aftermath ideas involves critical questioning and rational thinking towards the wire-framing stage. Phase-2 (Design): After analyzing the idea thoroughly and looking through all possible dimensions, comes the design part, where a feasible layout of the model is planned to move ahead for the further development processes. Phase-3 (Coding): Development process begins with designing a user-friendly UI. Prototypes of the model are prepared with the combined agreement of developers and designers to increase the efficiency and capitalization. The expedience checking r…

Amazon EC2 Server Setup & Installing JDK 8 and Tomcat 8, Running on Port 80 & 443 and Redirect Request from port 80 to 8080 and 443 to 8443

Amazon EC2 Server Setup & Installing JDK 8 and Tomcat 8, Running on Port 80 & 443 and Redirect Request from port 80 to 8080 and 443 to 8443.Step 1 : Log in to youraws account by following this link then click on my account and choose option aws management console.
Note: I am assuming you created your account with aws and you are ready with you account if you haven’t done then you can check out on google you will get many and it's a straight forward steps if you have still problem while creating an account you can comment in comment box i will also provide tutorial for that.
Once you logged in aws management console you are able to see window like this one


Note : Before we go ahead we have to select proper reason from right and side.I choose ohio region for this example.
Step 2 : Now you have to choose EC2 Server from Services tab on left side top corner then choose EC2 Services from “Compute option”

You will get window like this one and right now i have one instance is running for…