Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Sobota, 28. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  setting time zone

phpMyEdit Features     setting time zone
Odoslať novú tému   Odpovedať na tému    
 
sundua     Založený: 03.11.2016   Príspevky: 3  
Príspevok 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)
Príspevok 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  
Príspevok 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)
Príspevok 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  
Príspevok 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    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov