PHP timezone

From: CHYRON (DSMITHHFX)27 Jun 2022 14:40
To: ALL1 of 5
Trying to set PHP timezone from default UTC to America/Toronto ...

https://php.tutorials24x7.com/blog/set-same-timezone-in-php-mysql-and-apache

/etc/php/7.2/apache2/php.ini [Date] date.timezone = America/Toronto (also tried 'America/Toronto' and "America/Toronto"), restarted apache, did not appear to take when checked in phpinfo.php.

Can't find any *working* syntax examples for this.
EDITED: 27 Jun 2022 14:51 by DSMITHHFX
From: CHYRON (DSMITHHFX)27 Jun 2022 17:19
To: ALL2 of 5
Well, like all things computer, it's stupidly complicated unless you already know the answer. Then it's perfectly obvious! (I'm guessing).

I'm trying to apply our local time zone to a php/mysql file server timestamps because strangely, not all servers are located in 'UTC'. Who knew?

Anyhoo, I messed around with setting the mysql time zone to 'America/Toronto' in the cli, which appears to have worked, but this isn't reflected in time stamps of newly-uploaded files.

Also unclear if this will survive a restart, who in their right mind would want that?

 >-|
From: william (WILLIAMA)27 Jun 2022 18:16
To: CHYRON (DSMITHHFX) 3 of 5
Not something like another date.timezone entry somewhere later in php.ini?
From: Peter (BOUGHTONP)27 Jun 2022 18:47
To: ALL4 of 5
I very much recommend leaving all servers set to UTC always everywhere, and handling timezones when datetimes are output.
From: CHYRON (DSMITHHFX)28 Jun 2022 10:14
To: Peter (BOUGHTONP) 5 of 5
Your cautionary note has me thinking my mtime-based incremental backups could be screwed up over this, if I actually got it working. Feature!