| Index
» Projekty
» phpMyEdit
» Fórum
» setting time zone |
 |
sundua
Založený: 03.11.2016
Príspevky: 3
Zaslal: 2016-11-04 09:10
Návrat hore
Odpovedať s citátom
|
I am in time zone at plus 5 and half hours . I have stored timestamp and it is showing minus 9 hours in display as server is at minus nine hours location . Please HELP to set time zone php code
|
doug
Založený: 10.02.2003
Príspevky: 1013
Bydlisko: Denver, Colorado (USA)
Zaslal: 2016-11-06 20:00
Návrat hore
Odpovedať s citátom
|
http://php.net/manual/en/function.date-default-timezone-set.php
|
sundua
Založený: 03.11.2016
Príspevky: 3
Zaslal: 2016-11-07 00:22
Návrat hore
Odpovedať s citátom
|
I am able to get time zone SET/Modify in PHP server . But The timestamps STORED in MySql Server are displaying in phpmyedit as EDT time zone . But I want to change this timezone in SQL sever. I need to tweak settings in phpmyedit . in PHP code my sql settings are like this as shown below. and it works in my other areas of PHP code
$link = mysqli_connect($mysql_host,$mysql_user,$mysql_password,$mysql_database );
mysqli_query($link , "SET `time_zone` = '".date('+5:30')."'") ;
How to add this type of "set time zone " in phpmyedit. I am not conversant with OOP
|
doug
Založený: 10.02.2003
Príspevky: 1013
Bydlisko: Denver, Colorado (USA)
Zaslal: 2016-11-07 18:05
Návrat hore
Odpovedať s citátom
|
Use your text editor to search in the class file for
function connect()
Near the end of function connect(), just before it returns true, insert this:
mysql_query($this->db, "SET `time_zone` = '+05:30'");
|
sundua
Založený: 03.11.2016
Príspevky: 3
Zaslal: 2016-11-08 00:20
Návrat hore
Odpovedať s citátom
|
I added this
mysql_query("SET `time_zone` = '+5:30'" );
and it works !!!!!!!!!!!!!!!!!!! Many thanks
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|
|