Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid default timezone ID on new install (activation error) #12

Open
samwilson opened this issue Mar 25, 2015 · 1 comment
Open

Invalid default timezone ID on new install (activation error) #12

samwilson opened this issue Mar 25, 2015 · 1 comment

Comments

@samwilson
Copy link

When activating CDBT I am getting the following error:

Notice: date_default_timezone_set(): Timezone ID '' is invalid in D:\public_html\wp\wordpress\wp-content\plugins\cdbt\lib\cdbt.class.php on line 247

This is with a fresh install of the git master branch (fce9881).


What is the reason for setting the timezone, by the way? It appears to not be able to be set via the CDBT admin interface (it's always disabled; c.f.), and really all times should be stored internally in UTC (and calculated for display, if required). Could the TZ be removed? I'm happy to submit a PR.

@ka215
Copy link
Owner

ka215 commented Apr 1, 2015

Thank you very much for reporting.
And, I am sorry I haven't been in touch for a while.

What is the reason for setting the timezone, by the way?

The biggest reason, if the PHP has been upgraded in undefined timezone, because there may be a case that the date function will be unavailable. Also, when at the defined time than the undefined timezone, there is also a benefit of improving the processing speed of PHP. However, because it is addressed on the WordPress core side, as you say I think that there is no need to do again in the plugins side.
Initially, I had assumed a timezone definition for your local by CDBT plugin, because that can specify the JST as timezone for the column type of DATE and DATETIME of the table. However, a mixed state of the timezones such as UTC and JST is not preferred as a single system. Therefore, this timezone setting, I would try future exclusion.

Thank you,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants