Setting a default timezone?


Posted on 16th Feb 2014 07:03 pm by admin

I have read about how to change the timezone in PHPMYADMIN, but it changes back, it doesn't STAY there.
If thats not possible, if I had..;
$time = date("d-m-Y H-i-s" time());
or.. if I had
$time = time();

I think I am 6 hours ahead PHPMYADMIN time.
To set it in php.. would it be..


$t = 6 * 3600; // 3600 seconds in an hour, times it by 6. This could be 5 though.
$time = date("d-m-Y H:i:s" time()) + $t; // For the current date

// Or like..
$t = 6 * 3600; // 3600 seconds in an hour, times it by 6. This could be 5 though.
$time = time() + $t; // For the currunt unix timestamp


Also, how would I change the PHPMYADMIN default timestamp.. so that when I enter the dates, it'll show up with .. the correct time for GMT-london.

Thanks

No comments posted yet

Your Answer:

Login to answer
102 Like 44 Dislike
Previous forums Next forums
Other forums

Select all entries from database that include a phrase
I have a database of clubs - one of the categories is meeting time and place
I would like to have

post to self
Trying to get my form to submit to itself. However I am also trying to use an image for my submit bu

Passing PHP variables from one page to another
Hello-

I'm having trouble figuring out how to transport a variable from one php file to anoth

Querying info from one table based on info in another
Hi, I am currently trying to make a part for my user driven website where one user can subscribe to

my two tables
table1 : col1 = topicid , col2 = topic

table2 : col1 = sentid, col2 = sentence

Cod

Problem with PHP code- simple contact form
Hi Folks,
I'm relativily new to PHP; I know HTML and CSS stuff but I have a problem- I have a co

PHP and XML image gallery variable issue
I'm trying to display the large image on the same page as the thumbnails, to do that I'm passing a v

Dealing with code in db query
I am dealing with C code and I need to make sure it is encoded some how to ensure its integrity and

Doubles are giving me problems
Ok so, first of all i made a double = 0.05, but when running the debugger it shows up as 0.04999. I

restricting another login once you logout
Hello,

how can I restrict a page from login authenticating against info in a MySQL DB for a s

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash