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

Not "Just Another" MMORPG - text based.
Hello,

I've been learning MySQL and PHP for the last 2-3 years.
Though, I've had long paus

strtotime issue
Hey all,

I'm playing around with some code, and basically the idea is:

Person changes

Using Curl_multi for processing multiple URLs
Hi,

I am at a loss as to how to implement this. I would like to be able to automatically assi

TimeZoneOffset
Hello,

Please i need your help. I have a system that users can use to punch in and out. This

Reduce redundancies in switch functions?
Hello all! I somewhat new to PHP, and was wondering if anyone could give some suggestions on a swit

Printer configuration
Hi All,
Suppose one of the user deleted the printer settings unfortunatly ,then what is the pro

shoping cart issues
i´ve wrote this and works when i add an item to, my cart, but when i want to add othrer item just

Need help: how to catch acess of undefined class properties
Hello. I am learning OO with PHP and have hit a problem.
Some code runs as perfectly valid code,

Need help in log in and log out?
hi there all of u. i have recently created a site for someone. i have placed log in and log out and

Beginner PHP code help
Hi I'm new to php but if someone could please read the question below and help it would be great.

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