Forums / General Questions / Featured product dates are not correct (30/11/2036)

Featured product dates are not correct (30/11/2036)

Views: 772

Results 1 to 2 of 2
24 Aug 2013, 10:23 AM
#1
goshawk avatar

goshawk

Zen Follower

Join Date:
Aug 2006
Location:
Kihikihi, New Zealand
Posts:
220
Plugin Contributions:
2

Featured product dates are not correct (30/11/2036)

Hi all,

I tried to create some Featured Products, but when I submit the dates, they default to 30/11/2036 in my manager, while in my database they show as 0000-00-00. The other dates in my database under featured do display correct.

Could this be a language file problem?

From main english.php

// look in your $PATH_LOCALE/locale directory for available locales..
  @setlocale(LC_TIME, 'en_AU');
  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 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
  if (!function_exists('zen_date_raw')) {
    function zen_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);
      }
    }
  }

From admin english.php

// look in your $PATH_LOCALE/locale directory for available locales..
setlocale(LC_TIME, 'en_AU');
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 date()
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');
define('DATE_FORMAT_SPIFFYCAL', 'dd/MM/yyyy');  //Use only 'dd', 'MM' and 'yyyy' here in any order

I have included 2 screenshots. One from Admin and one from the databaseAttachment 12963Attachment 12964

Time is but an illusion, there is only "now"!

24 Aug 2013, 11:07 AM
#2
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: Featured product dates are not correct (30/11/2036)

Goshawk:

Hi all,

I tried to create some Featured Products, but when I submit the dates, they default to 30/11/2036 in my manager, while in my database they show as 0000-00-00. The other dates in my database under featured do display correct.

Could this be a language file problem?

From main english.php

// look in your $PATH_LOCALE/locale directory for available locales..
@setlocale(LC_TIME, 'en_AU');
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 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
if (!function_exists('zen_date_raw')) {
function zen_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);
}
}
}

// look in your $PATH_LOCALE/locale directory for available locales..
@setlocale(LC_TIME, 'en_AU');
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 date()
define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S');

////
// Return date in raw format
// $date should be in format[B] dd/mm[/B]/yyyy
// raw date is in format YYYYMMDD, or DDMMYYYY
if (!function_exists('zen_date_raw')) {
function zen_date_raw($date, $reverse = false) {
if ($reverse) {
return substr($date, [B]0[/B], 2) . substr($date, [B]3[/B], 2) . substr($date, 6, 4);
} else {
return substr($date, 6, 4) . substr($date, [B]3[/B], 2) . substr($date, [B]0[/B], 2);
}
}
}