note 45978 deleted from function.date by aidan

From: Date: Tue, 26 Oct 2004 00:41:42 +0000
Subject: note 45978 deleted from function.date by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-79104@lists.php.net to get a copy of this message
Note Submitter: Rehan S. Alvi ---- Hi everyone! I need some help and am new to PHP and the $date function. The problem is that I'm having the $date command take the date and time and put it into a log file of users that access the system. However, the server is located in Texas, USA and my user base is all in Islamabad, Pakistan. Therefore, I need the time which is put in the log file, to be different from the system time. For example, if a user logs in at 8 PM Pakistan time, the server (which is in Texas) will print 11 AM because the date is being retrieved from the local machine. Is there any way that I can make it print the adjusted time instead of the actual server time? This is what I have: $date = date("D M j G:i:s T Y"); $fh = fopen($log_file, 'a'); fwrite($fh,$date); What do I add? What should I do so that it will print the correct time? Thanks a lot!

« previous php.notes (#79104) next »