Problem with Date format in Profile View

hi all: can some one please tell me how to correct the date (date of birth) format in profile view. there are two things  going on here:

a) i had used the mod fix below to display date format to: mm/dd/yy and it was working fine. not sure what went wrong now but presently it displays dd/mm/yy. this is in new registration. how can i change it back to display mm/dd/yy?

b) in profile/edit profile if the date of birth is changed although it saves changes, it does not update the new changes with the info entered. instead and more specifically it displays: 11/30/99. i tried different dates and different profiles but the results are the same: 11/30/99 (not sure if this has anything to do with it but when edit profile the (date of birth) field displays: 0/0/00 as oppose to blank field before).

i double checked on the fix (below) and everything is in place as it supposed to. i've commented the fix and replaced with original. when original in place the date of birth disappeared from profile view entirely including the profile info label. i put the mod (below) and date of birth label is back but with wrong date format.

i've checked in every possible file related to date format to no avail (though, i'm not an expert) so i'm sure i'm missing something here. is there something in the db that should be changed? or ??? this is so frustrating... please help. thank you.

mod fix

inc/classes/BxDolProfileFields.php solution works, but it mess "last login" and "last edit" dates. So small correction can fix that too.

find:

function getViewableDate( $sDate ) {
return $sDate;
}

and replace it with:

function getViewableDate( $sDate ) {
return (strftime(getParam('short_date_format'), strtotime($sDate)));
}

function getViewableDate2( $sDate ) {
return $sDate;
}

Now we have two functions: one that we modified and will use for our date and original one getViewableDate2 which will use to avoid wrong "last" dates. Now we need to go and use that getViewableDate2 at "last" dates. Find this function getViewableValue( $aItem, $sValue ) and there is:

case 'DateLastEdit':
case 'DateLastLogin':
return $this -> getViewableDate( $sValue );

just replace getViewableDate with getViewableDate2 like:

case 'DateLastEdit':
case 'DateLastLogin':
return $this -> getViewableDate2( $sValue );

and done. Now you have correct dates for DOB and last login/edit.

Quote · 11 Mar 2009
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.