I am using the lighttpd webserver on a pi running raspbian stretch, with php version 7.0.
I can get a string representing the current date, time and timezone information onto a web page by calling the PHP function date('l jS \of F Y h:i:s a e')
.
However, if I change the timezone information in localisation options using raspi-config (version 20180518), then the timezone changes aren't reflected in the page served by the web server until I reboot the pi.
I believe that the changes caused by the the timezone changes are limited to rewriting the contents of the /etc/timezone file and creating a link from /etc/localtime to a relevant file under /usr/share/zoneinfo. Please can someone correct me if raspi-config is doing more?
I guess that lighttpd and PHP are somehow caching the timezone information and not recognising any changes. Can I force PHP to fetch the timezone information from the OS each time date() is called in some way?
By the way, this problem is NOT to do with web browser caching - reloading the web page shows a different date and time (but not timezone).