Correct Timezone Setting in Config?

3 posts in this topic

I installed a module and noticed that the "Installed Date" in Module Information showed "2 hours from now".  I also noticed that after I modified a page, the "Last Modified Date" showed the date and time, plus in parenthesis "2 hours from now".

I am in Eastern (New York) time, the server is in Central (Dallas) time, and the physical location of the entity for whom I built the site in in Pacific (Los Angeles) time.  When I installed the site, I changed the timezone to Los Angeles (if I recall correctly, it defaulted to Dallas), so now in my config file I have:

$config->timezone = 'America/Los_Angeles';

My question is twofold:
1. Should $config->timezone correspond to the servers timezone, or my (or the client's) timezone?
2. Is there any problem if it's set incorrectly?


PW 3.0.42

Share this post

Link to post
Share on other sites

u set 
for.use serveors timezine
no client

not big prolem if.u set wrong

3 people like this

Share this post

Link to post
Share on other sites

If you have SSH access to the server, run

dpkg-reconfigure tzdata

and pick the correct timezone (no root access is needed)

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By rastographics
      With Microsoft Azure recently releasing proper Linux and native Mysql hosting, it is becoming very easy to get processwire hosted on that platform.
      By default, they force SSL connection to the managed Mysql server. This causes processwire to fail when trying to connect.
      I can turn off SSL for my MySql server, but I wish there was a $config setting like $config->useSSL = true that would allow processwire to include the appropriate property in the connection string (like ssl=true or whatever).
      Here is the Azure link that explains what I would like to do:
      Am I missing this config setting somewhere? Or would it be easy to add? Thanks.
    • By bmacnaughton
      Do any experts have experience with the level of stability and/or support for turning on $config->advanced? I ask because of the warning at the bottom of the System tab "Please note that all of these system settings are intended for ProcessWire system development (not site development). Use them at your own risk."
      It provides two facilities that are invaluable to me (maybe because I don't know how to do them any other way).
      1) Disable Settings Tab on a per template basis
      2) Page Class Name - this makes it tweak a page while relying on the underlying Page class for the majority of functions.
      Are others using this setting in production? Have you used it over an extended time and seen that it is not changed often or at all?
    • By ---
      I'm using this piece of code to add a table layout to my module configuration:
      $this ->wire('modules') ->get('MarkupAdminDataTable') Then I use this to add rows to my table:
      $this ->wire('modules') ->get('MarkupAdminDataTable') ->row($data) But when I try to add a field to my table, It's not rendered as a field, I only see the the classname of the input field instead of the field itself.
      Is it possible to render a field into a table row?
    • By ---
      In my module's getModuleConfigInputfields method, I've added a field of type: InputfieldButton.
      I want this button have a different action than the usual submit button (which is still there) and the submit button to behave as it always does.
      For example; I want the InputfieldButton button to clear a few folders when it's clicked. Is this possible, if so, how can I achieve this?
    • By ---
      I've added a hook after the '"ProcessPageEdit::buildFormContent" event.
      I've added a new config option to the language settings:
      public function beforeAdminProcessPageEditBuildFormContent (HookEvent $event) { $editPage = $this->getPage(wire('input')->get('id')); if ($editPage->template->name == 'language') { // only add field when editing language page $field = wire('modules')->get('InputfieldText'); $field->attr('name+id', 'locale'); $field->label = __('Locale'); $event->return->insertAfter($field, $event->return->getChildByName('title')); } } I've also created a field (Setup > Fields > Add new) which I've also named 'locale'.
      The field is displayed, but the value isn't saved when I click the save button. How do I make sure the input of the field is saved as well? And how can I access the stored value once it's saved?