Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+6 votes
909 views
in Q2A Core by
Describe please...!

2 Answers

+6 votes
by
selected by
 
Best answer

1) open qa-config.php

2) at very bottom write below code with your region.

date_default_timezone_set('Asia/Ashgabat');

by
Thanks you...!
by
Not Working ...Timezone Still "+0000", I want change it to 2020-09-09T05:32:02+0530, How i did it.
by
"Not working" is not a valid problem description. Please post a new question and show what exactly you did to change the configuration.
+3 votes
by

If you're managing your own server you can set the timezone in php.ini by assigning the proper timezone to the date.timezone setting, e.g.:

date.timezone = "Asia/Dubai"

Restart the PHP service afterwards to have it pick up the change.

Alternatively you can set the system timezone on the server (although I'd recommend sticking to the php.ini approach). How you change the system timezone depends on your operating system. On Linux you set/change the symlink /etc/localtime to the desired timezone, e.g.:

ln -sf /usr/share/zoneinfo/Asia/Dubai /etc/localtime

On Windows you change the timezone in the date & time settings.

Again, restart the PHP service to make it pick up the change.


If you don't have admin access to the system you need to set the timezone by adding a line

date_default_timezone_set('Asia/Dubai');

to your qa-config.php as @esqeudero described in his answer.

by
I think it worked. Thanks again
by
Thanks... It worked... [tested]
by
+1
@JamilAhmad You're welcome. But since you said you went with the date_default_timezone_set() approach, you should probably accept esqeudero's answer instead of mine, since he originally posted it.
by
+1
Okay! But each of you helped me. Thanks!
...