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

PHP url branch??
Functionally, using PHP, I'm doing a test of login input submitted by a user via an html form in a f

Is STL important?
I'm just starting programming and I've made it until the Standart Template Library. But the chapter

Php Mysql Page Loading Notice
Hi all,

I was wondering if there is a way (Sure there is) of showing a message or an image wh

iterating through an array and escape each value independently.
I have a set up where the variable being escaped is an array and it needs to be iterated and escaped

PEAR in appliactiond development
When I was picking up PHP I went from procedural programming, fairly quickly into OOP, then after wr

update 2 columns by doing inner 2-column query
Hi,
is something like this possible?

update contract_all set col1,col2 =
(

Weekly Calendar
Hi, I am looking at creating a weekly calendar. The calendar will read from Monday - Sunday. Does an

PHP Captcha Error help - replace the "die" command
Hi All,

I am after a bit of help with a Captcha spam protection box.

The site gave me

Create PHP table grid help, please
I have a MySQL database setup, now it's time for the table (gridview) design in php. Here's the prob

How to validate from 2 possible answers
Hi

I hope somebody can help me with what will probably be really simple, I'm pulling my hair

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