Jump to content

date_default_timezone_set


sepoto
 Share

Recommended Posts

I am wondering why the error below is coming up. I have attached my snippet as well. I can't seem to figure this out.

Notice: date_default_timezone_set() [function.date-default-timezone-set]: Timezone ID 'PST' is invalid in C:\inetpub\wwwroot\dsgog\guide.php on line 27

//Set up the timezone array$TZ = array("PST" => -800,			"EST" => -500,			"CST" => -600,			"MST" => -700,			"PST-2" => -1000,			"PST-1" => -900);//Get the user's timezone info and if DST$sql = "select * from zip_timezone where zip = {$_SESSION['zip']}";$res = $db->query($sql);$row = $res->fetch_assoc();$timezone = $row['TZ'];$tz_offset = $TZ[$timezone];if($row['DST'] == "Y")  $tz_offset = (int)$tz_offset + 100;date_default_timezone_set('PST');

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...