Skip to content

Instantly share code, notes, and snippets.

@GlauberF
Forked from StefanieD/timezone.config
Created December 8, 2022 23:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GlauberF/671aeaf6ff40410d89ddcc66b5143805 to your computer and use it in GitHub Desktop.
Save GlauberF/671aeaf6ff40410d89ddcc66b5143805 to your computer and use it in GitHub Desktop.
AWS Elastic Beanstalk configuration file for set up your app timezone (independent from EC2 region).
container_commands:
01changePHP:
command: sed -i '/PHP_DATE_TIMEZONE/ s/UTC/Europe\/Berlin/' /etc/php.d/environment.ini
01achangePHP:
command: sed -i '/aws.php_date_timezone/ s/UTC/Europe\/Berlin/' /etc/php.d/environment.ini
02change_AWS_PHP:
command: sed -i '/PHP_DATE_TIMEZONE/ s/UTC/Europe\/Berlin/' /etc/httpd/conf.d/aws_env.conf
03php_ini_set:
command: sed -i '/date.timezone/ s/UTC/Europe\/Berlin/' /etc/php.ini
commands:
01remove_local:
command: "rm -rf /etc/localtime"
02link_Buenos_Aires:
command: "ln -s /usr/share/zoneinfo/Europe/Berlin /etc/localtime"
03restart_http:
command: sudo service httpd restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment