2016-11-29 68 views
0

我開發我的網站在WordPress和它的error_log使用默認服務器時區,但我希望它用我的時區是Asia/Kuwait如何使用wordpress在Apache中調整服務器的時區?

如何調整/更改服務器使用Wordpress利用我區的時間zone.I'm,我必須在php.ini

+1

你使用任何PHP框架?請提一下如果是這樣..其他請點擊此鏈接http://php.net/manual/en/function.date-default-timezone-set.php –

+0

是的,我使用wordpress –

+1

希望這可以幫助你http://幫助.coschedule.com/hc/en-us/articles/214455448-How-To-Change-Your-WordPress-Timezone –

回答

3

我想你沒有訪問正在尋找:date_default_timezone_set (string $timezone_identifier)

你也可以在你的php.ini配置中設置。

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

我無法訪問php.ini。我將嘗試'date_default_timezone_set(字符串$ timezone_identifier)' –

+0

@MohamedOmar你檢查這http://help.coschedule.com/hc/en-us/articles/214455448-How-To-Change-Your-WordPress-Timezone ? –

+0

是的,但它使用'date_default_timezone_set(字符串$ timezone_identifier)' –

0

您可以通過改變date.timezone

date.timezone = Asia/Kuwait 

This鏈接解釋如何做到這一點的價值在php.ini文件更改。

0

使用以下代碼設置您的默認時區設置。

粘貼此代碼在index.php文件

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

使用WP-管理儀表板設置時區。 一般設置 - >時區