Update _getTimestamp() to use DateTime class

Both the base constructor and the format() method are available since 5.2 so no need to use older procedural methods for backward-compatibility. This way global timezone doesn't need to be changed or restored.