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

Most basic form question ever?
Hello,

I want to use this snippet to make sure the fields in a form are ok before processing

mail with attachment problems
Hi. I have the following code:
Code: else if(file_exists("site".$timp.".zip")

Session login issue
I'm wondering how to fix a problem I'm having with a session-based login system

Say I go to h

Typedef struct vs just struct
Anyone know the rationale for using typedef for structs when a struct is itself a typedef? I have s

Please help understand this code
I noticed the index page on my site was modified this morning and found this code inserted at the bo

Code error with Index.php
Error: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/runevid/public_

remove a ; from emails in textarea
Code: <?php

session_start();

$database_host = "localhost&qu

mysql query with single quotes in a variable
$sitedetails = "INSERT INTO vars (address, sitename, description, ownername, theme) VALUES ('$u

Email Processor
I have a few questions so this post will be a larger one! Sorry, but I'm a bit of a PHP newbie so be

how do i make new line after *
First check this page here. and you see my report. Im pulling form a mysql db. I want to beable to m

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