This topic is locked
[SOLVED]

How i can set the the right time ?

7/16/2021 10:11:43 AM
PHPRunner General questions
I
I author

I use the quiz template template. when a user logs into the system, a record is added to the table xxxxxx_audit : user/ip/datetime
But the time does not match the current time.
9H30 should be 11H30, so the time is 2 hours behind. How can I set the correct time? thanks

HJB 7/16/2021
date("Y-m-d H:i:s",strtotime("+2 hours"))

Replace "now()" as the default time by the above code.

I
I author 7/16/2021

Yes correct, but I use the login option of phprunner ( 10.5 ) , at a login the table XXXXX_audit is filled, but I can't find the code anywhere, any idea ?

HJB 7/16/2021

Table XXXXX_audit is hidden (say, not added to the project by being UNTICKED under the view "datasource tables"
under TABLES section of PHPRunner. Now, if you tick it, you then can edit the "datetime" default value under FIELD
section of PHPRunner to implement the "+2hours code". Again, after this is done, you untick Table XXXXX_audit again
to remove it from the project (to hide it) again. Am not sure, it shall and can work, as I never had any touch with AUDIT
customizations at all, so this is just a kind of workaround from my end for inspiration purposes only.

P.S. The most common way to solve things like that is to edit the PHP.ini file on the web server to solve the problem, yet
as some users either have no access to same by restriction by their hosters or simply lack of exact knowledge on how to
it, the above workaround is (in my opinion) a workaround compromise.

I
I author 7/16/2021

modifying the XXXXX_audit table in phprunner gives no result.

Just to clarify:
WAMP . is running on my local PC
I have the file C:\Program Files\PHPRunner 10.5\EmbeddedServer\php\php. ini. adjusted :
date.timezone = "Europe/Brussels"

It now works great locally, but still not at the hoster: How can I adjust this so that it also works well at the hoster?

I
I author 7/16/2021

I have the solution :
In the event "after application initialized"
I write this code :
date_default_timezone_set('Europe/Brussels');

Works great now. Thanks for all