I am pulling some data from a MYSQL database in which I have a date-time that is stored in UTC, then converting everything into JSON. What I need to accomplish is that I want to show this datetime in UTC+3, not UTC.
This is how I am doing everything:
function getValues() {
$sth = mysql_query($query);
$rows = array();
while($r = mysql_fetch_assoc($sth)) {
$rows['announcements'][] = $r;
}
print json_encode($rows);
}
This is the output I get (example):
{
"announcements":[
{"id":"1","Title":"Title One","Details":"Detail of One","Submitter":"Alaa Alrufaie","DateSubmitted":"2016-03-06 17:03:48"},
{"id":"7","Title":"Title Seven","Details":"Detail of Seven","Submitter":"Alaa Alrufaie","DateSubmitted":"2016-03-06 17:23:44"}
]
}
How can I output the time in UTC+3 while maintaining this same JSON structure?