Guest Posted March 17, 2006 Posted March 17, 2006 Finding the correct way to configure the Date Format for Australia was a real challenge. A bit of info here and a bit there scattered throughout the forums. To make matters worse, many of the links provided by helpfull forum members are now dead. However, Ive managed to get it all working correctly by making the following changes. define('DATE_FORMAT_SHORT', '%d.%m.%Y'); // this is used for strftime() define('DATE_FORMAT_LONG', '%A, %d. %B %Y'); // this is used for strftime() define('DATE_FORMAT', 'd.m.Y'); // this is used for strftime() define('PHP_DATE_TIME_FORMAT', 'd.m.Y H:i:s'); // 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, 0, 2) . substr($date, 3, 2) . substr($date, 6, 4); } else { return substr($date, 6, 4) . substr($date, 3, 2) . substr($date, 0, 2); } } These changes need to be made near the top of the following files. admin/includes/languages/english.php includes/languages/english.php Enjoy :-)
Guest Posted March 20, 2006 Posted March 20, 2006 Finding the correct way to configure the Date Format for Australia was a real challenge. A bit of info here and a bit there scattered throughout the forums. To make matters worse, many of the links provided by helpfull forum members are now dead. However, Ive managed to get it all working correctly by making the following changes. define('DATE_FORMAT_SHORT', '%d.%m.%Y'); // this is used for strftime() define('DATE_FORMAT_LONG', '%A, %d. %B %Y'); // this is used for strftime() define('DATE_FORMAT', 'd.m.Y'); // this is used for strftime() define('PHP_DATE_TIME_FORMAT', 'd.m.Y H:i:s'); // 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, 0, 2) . substr($date, 3, 2) . substr($date, 6, 4); } else { return substr($date, 6, 4) . substr($date, 3, 2) . substr($date, 0, 2); } } These changes need to be made near the top of the following files. admin/includes/languages/english.php includes/languages/english.php Enjoy :-) You could have used the UK-Based osCommerce 2.2 contribution.
Guest Posted March 20, 2006 Posted March 20, 2006 You could have used the UK-Based osCommerce 2.2 contribution. I have no doubt you are right, but there is no information and no UK website link on either the oscommerce website or in the forum. If you want to be really helpful to other Australian users, please supply a link to the UK website. Regards
tocs01 Posted March 20, 2006 Posted March 20, 2006 Finding the correct way to configure the Date Format for Australia was a real challenge. A bit of info here and a bit there scattered throughout the forums. To make matters worse, many of the links provided by helpfull forum members are now dead. However, Ive managed to get it all working correctly by making the following changes. define('DATE_FORMAT_SHORT', '%d.%m.%Y'); // this is used for strftime() define('DATE_FORMAT_LONG', '%A, %d. %B %Y'); // this is used for strftime() define('DATE_FORMAT', 'd.m.Y'); // this is used for strftime() define('PHP_DATE_TIME_FORMAT', 'd.m.Y H:i:s'); // 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, 0, 2) . substr($date, 3, 2) . substr($date, 6, 4); } else { return substr($date, 6, 4) . substr($date, 3, 2) . substr($date, 0, 2); } } These changes need to be made near the top of the following files. admin/includes/languages/english.php includes/languages/english.php Enjoy :-) Thanks Buddy .. I needed that .. I couldnt work it out either. Works well. :thumbsup:
spax Posted March 20, 2006 Posted March 20, 2006 I have no doubt you are right, but there is no information and no UK website link on either the oscommerce website or in the forum. If you want to be really helpful to other Australian users, please supply a link to the UK website. Actually, you already had the correct date format. It is in the Spanish or German version.
MathewC Posted March 21, 2006 Posted March 21, 2006 Thanks for providing that. Also been looking all over for it.
my scrap shop G Posted June 8, 2006 Posted June 8, 2006 mate! where have you been. will give it a go, thanks.
EuroTimmy Posted July 17, 2007 Posted July 17, 2007 Finding the correct way to configure the Date Format for Australia was a real challenge. I much appreciate your efforts!!
Guest Posted July 17, 2007 Posted July 17, 2007 I have no doubt you are right, but there is no information and no UK website link on either the oscommerce website or in the forum. If you want to be really helpful to other Australian users, please supply a link to the UK website. Regards I just noticed your reply to my post. Oviously too hard to look in the contrib section (and I did say contribution), so here is the link. http://www.oscommerce.com/community/contri...search,uk+based
lyn Posted August 12, 2007 Posted August 12, 2007 Thanks for posting this, much easier than comparing two different files to work out which lines are changed. Just one thing, you probably want to take out the period (dot) after the day in the long date format - looks really strange! :) Cheers, Lyn Finding the correct way to configure the Date Format for Australia was a real challenge. A bit of info here and a bit there scattered throughout the forums. To make matters worse, many of the links provided by helpfull forum members are now dead. However, Ive managed to get it all working correctly by making the following changes. define('DATE_FORMAT_SHORT', '%d.%m.%Y'); // this is used for strftime() define('DATE_FORMAT_LONG', '%A, %d. %B %Y'); // this is used for strftime() define('DATE_FORMAT', 'd.m.Y'); // this is used for strftime() define('PHP_DATE_TIME_FORMAT', 'd.m.Y H:i:s'); // 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, 0, 2) . substr($date, 3, 2) . substr($date, 6, 4); } else { return substr($date, 6, 4) . substr($date, 3, 2) . substr($date, 0, 2); } } These changes need to be made near the top of the following files. admin/includes/languages/english.php includes/languages/english.php Enjoy :-)
h_aboulela Posted September 28, 2007 Posted September 28, 2007 Finding the correct way to configure the Date Format for Australia was a real challenge. A bit of info here and a bit there scattered throughout the forums. To make matters worse, many of the links provided by helpfull forum members are now dead. However, Ive managed to get it all working correctly by making the following changes. define('DATE_FORMAT_SHORT', '%d.%m.%Y'); // this is used for strftime() define('DATE_FORMAT_LONG', '%A, %d. %B %Y'); // this is used for strftime() define('DATE_FORMAT', 'd.m.Y'); // this is used for strftime() define('PHP_DATE_TIME_FORMAT', 'd.m.Y H:i:s'); // 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, 0, 2) . substr($date, 3, 2) . substr($date, 6, 4); } else { return substr($date, 6, 4) . substr($date, 3, 2) . substr($date, 0, 2); } } These changes need to be made near the top of the following files. admin/includes/languages/english.php includes/languages/english.php Enjoy :-) Thanks!!! this worked perfectly for me!
findtim Posted October 28, 2007 Posted October 28, 2007 thanks mate. don't forget to change the MM/DD/YYYY , 05/21/1970 etc throughout the files, just to make thigs neat tim
Guest Posted June 13, 2008 Posted June 13, 2008 Thanks saved me heaps of time great work Changed both files on 2.2rc2a and it made no difference at all?? Trying to set date for Australia. PS I even c oppied and paste the spanish section, it too made no difference (yes I did both english.php files) Can anyone help me
Recommended Posts
Archived
This topic is now archived and is closed to further replies.