Following the documentation, I'm trying to represent the date in the following format:
2017-01-07T11: 20: 00-03: 00
Code:
$dt = $_POST['data-emissao'];
$date = new DateTime($dt, new DateTimeZone('America/Sao_Paulo'));
$data= $date->format("Y-m-d\TH:i:sP");
echo $data;
And I'm getting:
2017-01-07T13: 32: 00-02: 00
Reference : link