I was using PHPRunner with PostgreSQL and `timestamp with time zone` (`timestamptz`) variable type, and I noticed the following issue.
Although my PostgreSQL database (in Azure) was configured to use the Europe/London timezone, within my PHPRunner application the default value for an updated field was set to now() and rather than showing my present BST time it was showing UTC values on ADD or EDIT of the form – this was resulting in the user observing UTC time in the updated and created fields at record add or edit.
After investigation I discovered that PHPRunner evaluates now() using PHP on the server when the Add or Edit pages are generated. The PHP now() function will pick up the server time, into in my case an Updated field, that wasn’t what I was wanting. I was wanting Europe/London time (with automated adjustment for BST) visible to the user in the UI prior to it being saved to the database.
Interestingly clicking the *Now* button within the DateTime control displayed the correct local time as it was picking up the default Javascript time from the browser which for me here was BST.
In other words:
* PHPRunner now() → PHP web server time
* Now button → Browser local time
* PostgreSQL `timestamptz` → Database session time
If these three are not aligned, you can end up with timestamps that differ.
—
Solution
While the PostgreSQL server was y configured to the correct timezone (in my case `Europe/London` in Postgres flexible server for Azure). I also needed to adjust the Web Server so that PHP identifies now as relating to British Summer Time. This can be done as follows;
In Global Events → After Application Initialized, add:
date_default_timezone_set("Europe/London");
Now I guess I could change the server to Europe/London Time and then PHPRunner `now()` function would generate the correct value and in Azure that might be possible but I prefer to keep my servers on UTC and so correcting the server time to Europe/London at application initialization seemed easier.
Simple fix that corrected all issues across all application forms
Tested Saturday 01 August 2026






