C# FileInfo.LastWriteTime and PHP filemtime

I’m using PHP to return the time a given file was last modifed. I convert it to a string that will match FileInfo.LastWriteTime under C# from within Unity. The PHP is being done like this to match the value of the C# version

$time = filemtime("../../Images/$id/$filename");
                
 $dateTime = date("n/j/Y g:i:s A", $time);

What’s interesting is it’s the same file on the same machine. One is in a folder inside my Unity project while the other is in the wamp folder. I placed the one in the wamp folder first and just made a copy of that one I dropped in the Unity directory to ensure they’d match. Yet using

FileInfo[] localImages = di.GetFiles();
			
foreach(FileInfo fi in localImages)
{
	Debug.Log (fi.Name + " : " + fi.Length + ", " + fi.LastWriteTime);
}

shows the write time as 5 hours AFTER the time returned from the PHP code. Anyone have any ideas why? If there’s a way I missed to convert LastWriteTime to Unix Seconds so I can match them by that it would be even better :slight_smile: I’m suspecting there’s a setting somewhere on the PHP side that’s putting me 5 hours behind where I really am, but with my geographical skills, I have no idea what’s 5 hours behind PST.

DUH! Finally dawned on me WAMP has to have a php.ini file. Sure enough, it was set to use UTC. For those with a similar issue, this was the perfect place to find the right value: http://www.php.net/manual/en/timezones.php