Mohamed Omar
Mohamed Omar

Reputation: 473

How to adjust server's time zone in Apache using wordpress?

I have developed my website in wordpress and it's error_loguses the default server time zone, but i want it to use my timezone which is Asia/Kuwait.

How to adjust/change the server to use my region's time zone.I'm using Wordpress and i have no access to the php.ini

Upvotes: 0

Views: 848

Answers (4)

Rahool Dhokiya
Rahool Dhokiya

Reputation: 135

use below code to set your default time zone set.

paste this code in index.php file

<?php date_default_timezone_set('Asia/Kolkata'); ?>

set your timezone using wp-admin dashboard. General Settings->Timezone

Upvotes: 0

newhere
newhere

Reputation: 1

Use this reference :

http://php.net/manual/en/timezones.php

Good luck.

Upvotes: 0

Daniel_ZA
Daniel_ZA

Reputation: 574

You can change it in your php.ini file by changing the value of date.timezone

date.timezone = Asia/Kuwait

This link explains how to do so.

Upvotes: 0

Rahul
Rahul

Reputation: 2474

I think you are looking for: date_default_timezone_set ( string $timezone_identifier )

You can also set this in your php.ini config.

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = Europe/Berlin

Upvotes: 3

Related Questions