I know this is an old thread, but it's still ranking well so hopefully I can add a solution to help others facing the same problem. I experienced the exact same situation. The dates in our database were correct, but when displayed in the administration section they were being adjusted/adapted when they didn't need to be. I made the following changes:
components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/libraries/cbpaidViewExtended.php
Change this in
function _form_datetime:
Code:
$adaptTimeZone = ( $node->attributes( 'timezone' ) == 'RAW' ) ? 0 : 1;
To this:
Code:
$adaptTimeZone = ( empty($node->attributes( 'timezone' )) || $node->attributes( 'timezone' ) == 'RAW' ) ? 0 : 1;
Why?
When setting the
flag, the function was checking the value of
Code:
$node->attributes( 'timezone' )
, which in our case wasn't set to anything. If you don't know the timezone, how can you know whether to adjust it? If it's not set, we are choosing to take the value for what it is and not offset it in any way.
administrator/components/com_comprofiler/comprofiler.class.php
Change this in
function cbFormatDate:
Code:
$date = substr( $date, 0, 10 );
To this:
Code:
$date = _old_cbFormatDate( $date, (($showtime) ? "%Y-%m-%d %H:%M:%S" : "%Y-%m-%d" ), 0);
Why?
Only date values being offset were showing the time portion. This change means non-offset dates can also show the time component as well, if requested.