Results 1 to 10 of 10
  1. #1
    Join Date
    Mar 2015
    Posts
    165
    Plugin Contributions
    0

    Default setting time zone

    linux based server using plesk. under plesk i have configured it to my time zone. but in server info under admin in zc, the time does not match.

    i followed this

    https://docs.zen-cart.com/user/new_u...pics/timezone/

    so got it corrected

    i guess my question is why? shouldn't zc be coded to pull the servers time zone or? hey just asking, i don't know these things. it just seems a little extra work, although not much, to have to do this. why not have something in the admin side to just drop down and choose?

    thank you.

  2. #2
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,135
    Plugin Contributions
    11

    Default Re: setting time zone

    Quote Originally Posted by travbacon View Post
    i guess my question is why? shouldn't zc be coded to pull the servers time zone or? hey just asking, i don't know these things. it just seems a little extra work, although not much, to have to do this. why not have something in the admin side to just drop down and choose?
    A server could be located in Chicago with websites from Hawaii to Great Britain and Canada to Brazil. Setting your website to YOUR time just makes it less confusing.

  3. #3
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,678
    Plugin Contributions
    123

    Default Re: setting time zone

    Quote Originally Posted by travbacon View Post
    why not have something in the admin side to just drop down and choose?
    It's something you only do once so I'm not sure it warrants an admin control. But you could always submit a PR if you feel strongly.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  4. #4
    Join Date
    Mar 2015
    Posts
    165
    Plugin Contributions
    0

    Default Re: setting time zone

    this makes complete sense for servers that is being used for shared hosting

  5. #5
    Join Date
    Mar 2015
    Posts
    165
    Plugin Contributions
    0

    Default Re: setting time zone

    no i get it but for the layman wanting to use zc out of the box, makes a little sense

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,474
    Plugin Contributions
    88

    Default Re: setting time zone

    Quote Originally Posted by swguy View Post
    It's something you only do once so I'm not sure it warrants an admin control. But you could always submit a PR if you feel strongly.
    Quote Originally Posted by travbacon View Post
    no i get it but for the layman wanting to use zc out of the box, makes a little sense
    When I saw @travbacon's initial posting, my thought ran to the zc_install process where one-time configuration settings (like database credentials) are gathered.

  7. #7
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,684
    Plugin Contributions
    9

    Default Re: setting time zone

    i preface all date posts, by stating i hate dates.

    Quote Originally Posted by swguy View Post
    It's something you only do once so I'm not sure it warrants an admin control. But you could always submit a PR if you feel strongly.
    oh sloth and indolent one.... code already does it... adding yet another admin control with a pulldown? oh, please no....

    Quote Originally Posted by travbacon View Post
    linux based server using plesk. under plesk i have configured it to my time zone. but in server info under admin in zc, the time does not match.

    i followed this

    https://docs.zen-cart.com/user/new_u...pics/timezone/

    so got it corrected

    i guess my question is why? shouldn't zc be coded to pull the servers time zone or? hey just asking, i don't know these things. it just seems a little extra work, although not much, to have to do this. why not have something in the admin side to just drop down and choose?

    thank you.
    the code for this is here:
    https://github.com/zencart/zencart/b..._time_zone.php

    pretty clear that if you do not set the timezone as indicated in the docs, ZC will pull the time zone from the function date_default_timezone_get(). and that function has an order of precedence with regards to what timezone it uses as seen here:

    https://www.php.net/manual/en/functi...mezone-get.php

    as you are on a dedicated server running centos, the question for me remains what is plesk updating? the system timezone? most probably... but what timezone is set in your php.ini file? that can be seen by going to admin -> tools -> server version info and the searching that page for the default timezone. you can see the default timezone for your server as well as the default timezone for php (listed as date.timezone just below that).

    and finally, after you updated your timezone (using plesk), does apache require a restart in order to use that new config value?

    in looking at the code, it's apparent to me, that ZC is doing things correctly. and the issue being brought up here is one of system administration.

    i'll end the same way i started. i hate dates.

    best.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  8. #8
    Join Date
    Mar 2015
    Posts
    165
    Plugin Contributions
    0

    Default Re: setting time zone

    Quote Originally Posted by lat9 View Post
    When I saw @travbacon's initial posting, my thought ran to the zc_install process where one-time configuration settings (like database credentials) are gathered.
    my site is something that i converted over from oscommerce back in 1.3.9

  9. #9
    Join Date
    Mar 2015
    Posts
    165
    Plugin Contributions
    0

    Default Re: setting time zone

    Quote Originally Posted by carlwhat View Post
    i preface all date posts, by stating i hate dates.
    i'll end the same way i started. i hate dates.

    best.
    what if she calls up for a date?

  10. #10
    Join Date
    Mar 2015
    Posts
    165
    Plugin Contributions
    0

    Default Re: setting time zone

    Quote Originally Posted by carlwhat View Post
    does apache require a restart in order to use that new config value?

    best.
    typically plesk will tell if you if it needs a restart. it's just a gui so end users like me don't have to deal with linus commands under ssh

 

 

Similar Threads

  1. Setting time zone on admin login page
    By ParseRaider in forum Basic Configuration
    Replies: 2
    Last Post: 5 Apr 2017, 06:22 AM
  2. v154 time zone setting warning
    By kgovett in forum General Questions
    Replies: 2
    Last Post: 16 Jan 2016, 01:40 AM
  3. Setting Time Zone clarification
    By Nuwanda in forum Basic Configuration
    Replies: 5
    Last Post: 5 Jun 2008, 04:46 PM
  4. Setting Time Zone
    By axl23 in forum General Questions
    Replies: 2
    Last Post: 16 Dec 2006, 06:04 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR