Usage
Use the following to set the system time on the AWS Elastic Beanstalk machine to Eastern Timezone.
Assumptions and Limitations
- Examples on this page assume you are setting the time to Eastern Timezone.
- Rails app logs at
/var/app/current/log
will show times in ET timezone. - AWS logs at
/var/log
will continue to have GMT timezone. Since ET = GMT-5, to translate to ET, subtract 5 from the hour.
Add the ebextensions script and deploy
Add .ebextensions/change_timezone.config
to your app with the following content:
commands: 00_change_timezone: command: ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
On the next deploy, this will set the timezone on the AWS machine. Executing date
at the command line will show the date time in ET.