Shell Looking up Timezone and update php.ini

I'm trying to script (sh) an installation of PHP. The script installs php74, copies /usr/local/etc/php.ini-production to /usr/local/etc/php.ini etc. This is all working. I'm now trying to automatically update the timezone in php.ini.

My qustion: Is it possible to find the continent and timezone in FreeBSD (e.g. Asia/Calcutta) and pass this through to php.ini with sed(1)

;date.timezone =

to

date.timezone = Asia/Calcutta

Any pointers or examples will be greatly appreciated ! :)
 
Perfect, Jose. I had looked at different places, but couldn't find it, e.g.
Code:
tail -n1 /etc/localtime
Thank you so much.
 
Back
Top