But still I'm having this weird issue:

This line of code:
Code:
strftime("%Y%m%dT%H%M%SZ", strtotime($datetime));


Produces unexpected output based on inputs:
Code:
$datetime:    2016-11-05T16:00:00-0400
Output:       20161105T130000Z

$datetime:    2017-01-27T18:00:00-0800
Output:       20170127T180000Z

$datetime:    2017-09-22T17:00:00-0500
Output:       20170922T150000Z
_________________________
Tony Fabris