I just ran into some trouble with an interface that is running on a germany based server but is accessed from a server in the U.S. and also in german. So when a client ie opens a ticket it will appear with the german time. An easy way to fix this issue on a linux based system is by setting the timezone environment with putenv.

<?php 
 
 
 
$us_ip = "<your_server_ip>";
 
 
 
echo "localtime: ".date("H:i:s");
 
 
 
if($_SERVER['SERVER_ADDR'] == $us_ip) {
 
	 putenv('TZ=US/Central'); 
 
}
 
 
 
echo " US/Central time: ".date("H:i:s");
 
?>
(via http://www.php.net/putenv)

Bookmark this!

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • del.icio.us
  • Digg
  • Fark
  • Furl
  • MisterWong
  • NewsVine
  • Reddit
  • Spurl
  • StumbleUpon
  • TailRank
  • Technorati

Submit your comment

vision22.net

Copyright © 2007