-1

I have hosted my PHP website on godaddy, it is working fine. But the problem is it is showing timezone to American/Phoneix which i want to change in Asia/Karachi.

So i found that i have to put this (date.timezone = "Asia/Karachi") line in PHP.ini file. So i have paste it into php.ini which is located at root of my site. but still timezone to American/Phoneix. What i am doing wrong?

I have also tried to write this (date.timezone = "Asia/Karachi") line in htaccess file but it also didn't work.

Remember i am unable to reload my server at godaddy.

Muhammad Faizan Khan
  • 10,013
  • 18
  • 97
  • 186

2 Answers2

1

Try to set the time zone in your .htaccess:

php_value date.timezone Asia/Karachi

If this doesn't work try to use ini_set:

<?php
ini_set('date.timezone', 'Asia/Karachi');
// or
date_default_timezone_set('Asia/Karachi');
Kyoya
  • 343
  • 2
  • 5
0

i'm using php 5.6. In php.ini should you try remove "" likes that:

date.timezone = Asia/Karachi

or config in your php file :

date_default_timezone_set("Asia/Karachi");

Quyen Anh Nguyen
  • 1,204
  • 13
  • 21