Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    red flag Date on "Specials" showing the year 2036

    Hi all,

    I am a new Zenner, made a lot of changes and modifications to date, all work well except for this one:

    have changed the date format in various files to DD/MM/YYYY to conform with Australian standards. All fine until I set start and finish dates to "Specials" and "Featured Products". I use the calendar, click my date, hit save, get back to the listing and the date shows garbage like the year 2036 (may not be alive then .... I am 53 now ).

    any ideas what may have gone wrong?

    thanks / Frank

    www.frnt.org/zencart/

  2. #2
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: Date on "Specials" showing the year 2036

    Thanks to "scrat" - I have done exactly what was suggested and it works fine - no more year 2036 - I might still be alive then which is my aim anyway.

    With the Best of Health

    Frank

    Frank Riegel Natural Therapies

  3. #3
    Join Date
    Mar 2007
    Location
    Los Angeles, CA
    Posts
    45
    Plugin Contributions
    0

    Default Re: Date on "Specials" showing the year 2036

    What was the solution? I have a similar problem and can't seem to find a solution. If you could please post how you solved this, I'd very much appreciate it, as it may help me pinpoint what I might do in my situation.

    Thank you!

    - Jaye

  4. #4
    Join Date
    Jun 2008
    Posts
    2
    Plugin Contributions
    0

    Default Re: Date on "Specials" showing the year 2036

    Mee too, please post the solution!

  5. #5
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,267
    Plugin Contributions
    3

    Default Re: Date on "Specials" showing the year 2036

    The major area you need to change is in english.php (and remember, if you are editing the core file, save it to your overrides folder(s).

    In english.php find:-

    PHP Code:
      @setlocale(LC_TIME'en_US.ISO_8859-1');
      
    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
      
    if (!function_exists('zen_date_raw')) {
        function 
    zen_date_raw($date$reverse false) {
          if (
    $reverse) {
            return 
    substr($date32) . substr($date02) . substr($date64);
          } else {
            return 
    substr($date64) . substr($date02) . substr($date32); 
    Now, look CAREFULLY at this EDIT, to see what's changed:-
    PHP Code:
    @setlocale(LC_TIME'en_UK.ISO_8859-1');
    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 dd/mm/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($date02) . substr($date32) . substr($date64);
    } else {
      return 
    substr($date64) . substr($date32) . substr($date02); 
    The above edit will return the date in UK format, as DD/MM/YYYY.

    But that's not all...

    Further down in english.php, you will need to find DEFINE statements that refer to DATE, and where you see a DEFINE that is listed as MM/DD/YYYY, you must make the necessary edit to have it show as DD/MM/YYYY .

    Remember, you may have various additional modules installed, and in their CONFIGURATION settings (generally controlled via your admin panel somewhere), you may have to re-set the date parameters as well (from MM/DD/YYYY to DD/MM/YYYY).
    20 years a Zencart User

  6. #6
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,267
    Plugin Contributions
    3

    Default Re: Date on "Specials" showing the year 2036

    ... Oh... and remember now, after you've made the edits, when you INPUT any dates into your system, you must now put them in as DD/MM/YYYY !!! You may ALSO have to call up any previous date-specific data record, as it's quite likely to be misconfigured after your english.php edit.
    20 years a Zencart User

  7. #7
    Join Date
    Oct 2008
    Location
    Australia
    Posts
    34
    Plugin Contributions
    0

    Default Re: Date on "Specials" showing the year 2036

    Quote Originally Posted by schoolboy View Post
    The major area you need to change is in english.php (and remember, if you are editing the core file, save it to your overrides folder(s).

    In english.php find:-

    PHP Code:
      @setlocale(LC_TIME'en_US.ISO_8859-1');
      
    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
      
    if (!function_exists('zen_date_raw')) {
        function 
    zen_date_raw($date$reverse false) {
          if (
    $reverse) {
            return 
    substr($date32) . substr($date02) . substr($date64);
          } else {
            return 
    substr($date64) . substr($date02) . substr($date32); 
    Now, look CAREFULLY at this EDIT, to see what's changed:-
    PHP Code:
    @setlocale(LC_TIME'en_UK.ISO_8859-1');
    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 dd/mm/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($date02) . substr($date32) . substr($date64);
    } else {
      return 
    substr($date64) . substr($date32) . substr($date02); 
    The above edit will return the date in UK format, as DD/MM/YYYY.

    But that's not all...

    Further down in english.php, you will need to find DEFINE statements that refer to DATE, and where you see a DEFINE that is listed as MM/DD/YYYY, you must make the necessary edit to have it show as DD/MM/YYYY .

    Remember, you may have various additional modules installed, and in their CONFIGURATION settings (generally controlled via your admin panel somewhere), you may have to re-set the date parameters as well (from MM/DD/YYYY to DD/MM/YYYY).
    Hey schoolbuy,

    New Zenner here...

    I'm sounding like a real clutz here.. where is the override folder located that I need to save to? Or do I have to make one and put it somewhere?

    Cheers,
    MG
    MG Page
    "The Silent Avatar Speaks"
    http://www.silentavatar.com/blog/

 

 

Similar Threads

  1. "Specials" sidebox showing only for certain categories?
    By kcb410 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 9 Sep 2012, 01:25 AM
  2. how to change the name "specials" to "on sale"?
    By lina0962 in forum Basic Configuration
    Replies: 1
    Last Post: 20 Nov 2010, 12:16 AM
  3. Display "Best Sellers" like "What's New" or "Specials" lists.
    By jsmooth in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 22 Jun 2010, 12:06 AM
  4. Possible to set the "also bought" and "specials" to nofollow?
    By shrimp-gumbo-mmmhhh in forum General Questions
    Replies: 2
    Last Post: 10 May 2010, 01:40 PM
  5. On Specials - How can I just display "20% off" or "save $x.xx", but not the price
    By candylotus in forum Setting Up Specials and SaleMaker
    Replies: 0
    Last Post: 24 Apr 2008, 12:44 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg