Using a Time Zone Conversion When Dynamically Generating Results
- by John
Hello,
If I understand correctly, the code below converts $row["datesubmitted"] from one timezone to another.
I would like to print the converted $row["datesubmitted"] dynamically in an HTML table. Is there a way that I can apply the conversion below for each row that is pulled from MySQL? I assume that I can't just plug $row["dt"] into the code since there is no field called "dt" in the MySQL that I am using.
Thanks in advance,
John
$dt = new DateTime($row["datesubmitted"], $tzFrom);
$dt->setTimezone($tzTo);