Guest Posted May 7, 2007 Share Posted May 7, 2007 Greetings: I've recently installed the latest version of osCommerce - great product, by the way - but I have an issue with the way the birthdate in my test account is being displayed. I entered 02/24/1969 but 12/31/1969 is showing in the dob field on the account_edit.php page. The data is correct in the database but does not display as such. Suggestions are appreciated. Thanks for taking a moment to read this post! Link to comment Share on other sites More sharing options...
oschellas Posted May 7, 2007 Share Posted May 7, 2007 You have to specify a couple of instances regarding the date output in catalog/includes/languages/yourlanguage.php Link to comment Share on other sites More sharing options...
Guest Posted May 7, 2007 Share Posted May 7, 2007 I checked all of the date instances in the specified file but do not see that anything is out of order. I even changed the locale syntax, all to no avail. I may be missing something. No? Below is a snip of the variables that I was looking at: @setlocale(LC_TIME, 'en_US'); define('DATE_FORMAT_SHORT', '%m/%d/%Y'); // this is used for strftime() define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime() define('DATE_FORMAT', 'm/d/Y'); // this is used for date() define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S'); //// // Return date in raw format // $date should be in format mm/dd/yyyy // raw date is in format YYYYMMDD, or DDMMYYYY function tep_date_raw($date, $reverse = false) { if ($reverse) { return substr($date, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4); } else { return substr($date, 6, 4) . substr($date, 0, 2) . substr($date, 3, 2); } } Link to comment Share on other sites More sharing options...
oschellas Posted May 7, 2007 Share Posted May 7, 2007 define('DATE_FORMAT', 'd/m/Y'); // this is used for date() define('DOB_FORMAT_STRING', 'dd/mm/yyyy'); Link to comment Share on other sites More sharing options...
Guest Posted May 7, 2007 Share Posted May 7, 2007 Now it shows up as 31/12/1969. This only moves the incorrect numbers around. The form element is being populated by the function tep_date_short in the general.php function definitions. If I delete the function call and just have it pull $account['customers_dob'] straightaway, I end up 1969-02-24 00:00:00 in the field. The proper data, but not a pretty format. I doubt that the tep_date_short function is faulty. Is there another config variable that I could be missing? Link to comment Share on other sites More sharing options...
oschellas Posted May 7, 2007 Share Posted May 7, 2007 You have to re-enter the correct dob in your account. Link to comment Share on other sites More sharing options...
Guest Posted May 7, 2007 Share Posted May 7, 2007 I've done that. The dob is correct in the database - it's just getting mangled on the way to the form element population. Link to comment Share on other sites More sharing options...
oschellas Posted May 7, 2007 Share Posted May 7, 2007 Are we discussing the catalog part or the admin? For the admin you have to repeat the previous steps in catalog/admin/includes/languages/yourlanguage.php Link to comment Share on other sites More sharing options...
Guest Posted May 7, 2007 Share Posted May 7, 2007 The incorrect data shows in the admin module as well as the customer store side. Link to comment Share on other sites More sharing options...
oschellas Posted May 7, 2007 Share Posted May 7, 2007 And you edited from both the language files? Have a look at this post. Link to comment Share on other sites More sharing options...
Guest Posted May 7, 2007 Share Posted May 7, 2007 I edited both files. Following the example of the post that you suggested only changes slashes to dots. I still get the erroneous output. The site is hosted on godaddy. Would this have any relevance? All other date output on the site seems to be fine. It's just this field. Link to comment Share on other sites More sharing options...
oschellas Posted May 7, 2007 Share Posted May 7, 2007 Maybe it worths to have a look at the german.php files in the catalog and the admin since they have the correct date setup. Here one more link you could check out. I don't think the problem is caused due to your provider. Link to comment Share on other sites More sharing options...
Guest Posted May 7, 2007 Share Posted May 7, 2007 No luck there either. I'll disable the DOB field for now. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.