Accessing Examples from Editor extension throws DateTime usage warning

Accessing Examples from Editor extension throws DateTime usage warning

medusa101medusa101 Posts: 10Questions: 0Answers: 0


When I access any of the examples of Editor extension, the browser throws the following error.


DataTables warning: table id=example - DateTime::__construct(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.

All the non-Editor examples from base Datatables package work all right.

Any suggestions? I have set the date.timezone="Asia/Kolkata" in php.ini



  • allanallan Posts: 58,269Questions: 1Answers: 9,321 Site admin

    Hi Adi,

    We just had a little discussion about this via e-mail, but in case anyone else comes across this page, here is my answer:

    The error you are seeing indicates that the PHP install is not complete and the warning is coming from PHP when a date or time method is used. The best way to deal with this error is to set the date.timezone property in your php.ini file on your server. Failing that the date_default_timezone_set method can be used in PHP.

    The PHP documentation contains further information/


  • medusa101medusa101 Posts: 10Questions: 0Answers: 0

    Thanks Allan for the extremely quick response. For others who may visit this page, here are a couple of things you should make sure.

    1. You are editing the correct php.ini. Both Linux and Mac OS comes with default PHP deployment and a default Apache installation. So if you have done a fresh installation and are using that ensure the correct php.ini is edited.

    2. Make sure you put a valid timezone from

    3. Last but not the least remember to uncomment the line which is usually commented in php.ini. :)

This discussion has been closed.