Jump to content

[SOLVED] Offsetting server time ahead to local time using date();


Dale_G

Recommended Posts

Hello everyone,

 

This is a snippet of my script right now...

 

		$time 	= "\n\nTime: ".date('h:i:s A');
	fwrite($handle, $time);

 

This code is apart of a script in which it gathers information and logs it to a .txt file.

 

Now, what I'd like to do is offset the time it's outputting ahead by 3 hours. So if it's logging

 

Time: 8:44:21 PM

 

I'd like it to be offset by 3 hours, to match my local time. So it would now be...

 

Time: 11:44:21 PM

 

Thanks! :D

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.