Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Mar 2007
    Posts
    8
    Plugin Contributions
    0

    Default Time and date display

    Hi, the time in the top of my admin panel is reading wrong, how can i adjust it?
    Also how can i change the date formats inmy cart to be australian instea dof american?

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Time and date display

    There is a module for this in the downloads area/other
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Mar 2007
    Location
    USA
    Posts
    4
    Plugin Contributions
    0

    Default Re: Time and date display

    I used the TimeZone mod in the downloads section, and it works fine for this. The Time Zone Offset mod is in the "Other Modules" section of the downloads on this site fixes this.

    CLICK HERE
    Last edited by rylord; 10 Mar 2007 at 05:42 AM. Reason: added link

  4. #4
    Join Date
    Mar 2007
    Location
    USA
    Posts
    4
    Plugin Contributions
    0

    Default Re: Time and date display

    As far as the time format, I am no expert of Zen cart, but you might be able to rearrange the data contained in the file:

    /includes/functions/functions_general.php
    where it says:

    Code:
    // Output a raw date string in the selected locale date format
    // $raw_date needs to be in this format: YYYY-MM-DD HH:MM:SS
      function zen_date_long($raw_date) {
        if ( ($raw_date == '0001-01-01 00:00:00') || ($raw_date == '') ) return false;
        $year = (int)substr($raw_date, 0, 4);
        $month = (int)substr($raw_date, 5, 2);
        $day = (int)substr($raw_date, 8, 2);
        $hour = (int)substr($raw_date, 11, 2);
        $minute = (int)substr($raw_date, 14, 2);
        $second = (int)substr($raw_date, 17, 2);
        return strftime(DATE_FORMAT_LONG, mktime($hour,$minute,$second,$month,$day,$year));
      }
    And rearrange it to your liking....in the string

    Code:
    return strftime(DATE_FORMAT_LONG, mktime($hour,$minute,$second,$month,$day,$year));
    One of the experts on here might be able to give you some more insight on this??

  5. #5
    Join Date
    Aug 2005
    Location
    Vic, Oz
    Posts
    1,905
    Plugin Contributions
    5

    Default Re: Time and date display

    Quote Originally Posted by cfardon View Post
    Also how can i change the date formats inmy cart to be australian instea dof american?
    You need to edit
    /admin/includes/languages/english.php
    &
    /includes/languages/english.php

    to change the date format in lines such as...

    PHP Code:
    ////
    // 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);
          }
        }
      } 
    & a couple more places in these 2 files

  6. #6
    Join Date
    Mar 2007
    Posts
    8
    Plugin Contributions
    0

    Default Re: Time and date display

    Sorry for my ignorance, but what doi change in these lines....i dont know much about what i am doing.

  7. #7
    Join Date
    Feb 2007
    Posts
    90
    Plugin Contributions
    0

    Default Re: Time and date display

    I'd like to make this change aswell (date format) but I'm not sure what to change in those files? In some places its fairly obvious but in others its not. Could someone maybe post up a copy of the files highlighting the changes?

  8. #8
    Join Date
    Aug 2005
    Location
    Vic, Oz
    Posts
    1,905
    Plugin Contributions
    5

    Default Re: Time and date display

    Quote Originally Posted by psr racing View Post
    I'd like to make this change aswell (date format) but I'm not sure what to change in those files? In some places its fairly obvious but in others its not. Could someone maybe post up a copy of the files highlighting the changes?

    Try these 2 patched english.php files

    Always backup or save the existing english.php files (just in case)
    Remember to rename the directory YOUR_TEMPLATE to whatever the name is of the template that you are using before uploading.

    If you want to see the differences from normal use a program like winmerge. You will find it saves lots of time when you need to upgrade the site.
    Attached Files Attached Files

  9. #9
    Join Date
    Feb 2007
    Posts
    90
    Plugin Contributions
    0

    Default Re: Time and date display

    The second english.php file I'm not sure where to put it. The file path doesn't match the file path in Zen?
    Oz date Includes>languages>my-template
    Zen Includes>languages>? choices here are classic folder, english folder and english.php. I'm using blue-sky but thers no blue-sky folders there.

  10. #10
    Join Date
    Aug 2005
    Location
    Vic, Oz
    Posts
    1,905
    Plugin Contributions
    5

    Default Re: Time and date display

    Quote Originally Posted by psr racing View Post
    The second english.php file I'm not sure where to put it. The file path doesn't match the file path in Zen?
    Oz date Includes>languages>my-template
    Zen Includes>languages>? choices here are classic folder, english folder and english.php. I'm using blue-sky but thers no blue-sky folders there.
    if your template directory is blue-sky

    then rename
    includes>languages>YOUR_TEMPLATE
    to
    includes>languages>blue-sky

    the file would then be in blue-sky
    ie
    includes>languages>blue-sky>english.php

    I would normally unpack the zip to my computer
    rename any YOUR_TEMPLATE directories to the name of the template directory that you are using.
    Then ftp the whole directory structure across to your website.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Sales or Specials with Time and Date (instead of date only) Expiration
    By townsend2009 in forum Setting Up Specials and SaleMaker
    Replies: 3
    Last Post: 29 Jan 2015, 07:56 PM
  2. Date/Time Display
    By LissaE in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 6 Nov 2008, 05:03 AM
  3. Date and Time change
    By kerbybabe in forum General Questions
    Replies: 1
    Last Post: 15 Jan 2008, 11:41 PM
  4. Date and Time
    By motor in forum General Questions
    Replies: 2
    Last Post: 14 May 2007, 08:59 PM

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