• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 221
  • Last Modified:

unix timestamp is hardcoded in my table but appears different on different host (timezones)

old code, will update soon because does not use pdo, mysqli
code uses mysql

$qfetch='SELECT * from email_doc';
while ( $row = mysql_fetch_object( $fetch ) );

echo ' '.date("D", $row->real_timestamp);
echo'<br>'.date("M j, g:i A", $row->real_timestamp);

this is unix_timestamp which is unix_timestamp with an hour added


these values are different on different servers.  Is there a way to set timestamp

I created another column and I need to add 4-6 hours depending upon which server I am hosting information even though value is hardcoded in datebase table.
1 Solution
Ray PaseurCommented:
Please read the article here.  Look for the part about PHP and MySQL Have Different Time Zone Settings (but please read the entire article - it has background information you need in order to understand what you're getting into!)
rgb192Author Commented:
I have read the article and I do not know why this specifically occurs so I have created a question with more details and testing.  Thanks for the information.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now