You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off, thank you for this code. I'm using it to activate an account on a 3rd party server when a user clicks the validate link in the user email activation.... You've done all the hard work and saved me a ton of time.
Using this in the code
'created_time' => date('Y-m-d H:i:s')
Is writing UTC or some other time into the record, which is not the correct local time.
I've fixed this in my copy of your code by adding this to the top
use FOF30\Date\Date;
and then where I need the correct time
// Get current date and time in database format
JLoader::import('joomla.utilities.date');
$now = new Date();
$now = $now->toSql();
Finally when inserting
'created_time' => $now
I believe that FOF30 is part of Joomla core, but alack it could be part of admintools.
The text was updated successfully, but these errors were encountered:
First off, thank you for this code. I'm using it to activate an account on a 3rd party server when a user clicks the validate link in the user email activation.... You've done all the hard work and saved me a ton of time.
Using this in the code
'created_time' => date('Y-m-d H:i:s')
Is writing UTC or some other time into the record, which is not the correct local time.
I've fixed this in my copy of your code by adding this to the top
use FOF30\Date\Date;
and then where I need the correct time
// Get current date and time in database format
JLoader::import('joomla.utilities.date');
$now = new Date();
$now = $now->toSql();
Finally when inserting
'created_time' => $now
I believe that FOF30 is part of Joomla core, but alack it could be part of admintools.
The text was updated successfully, but these errors were encountered: