How can date_default_timezone be set for a created date column ?

QuestionsHow can date_default_timezone be set for a created date column ?
toki asked 11 years ago

Hi Abu,

There is an hour difference with my phpgrid time field and computer system time. Therefore I try to use date_default_timezone_set in formatoptions. But It does not work ? Is there any other solution or formatoption for this ?

$col["formatter"] = "date"; // format as date
$col["formatoptions"] = array("srcformat"=$'Y-m-d', "newformat"=$'d.m.Y'),"date_default_timezone_set"=$'Europe/Istanbul');

Regards…

1 Answers
toki answered 11 years ago

Hi Abu,

date_default_timezone_set('Europe/Istanbul'); // TO PUT THIS LINE IN PHP PAGE SOLVES TIMEZONE PROBLEM

$bg=date("d-m-Y");

$db_conf = array();
$db_conf["type"] = "mysql"; // mysql,oci8(for oracle),mssql,postgres,sybase
$db_conf["server"] = "localhost";
$db_conf["user"] = "root";
$db_conf["password"] = "";
$db_conf["database"] = "test";

Please, don't mind for my being in a hurry sometimes.

Regards…

Your Answer

16 + 5 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?