You should look at the DateTime object and its related functions in the documentation.
If your input date is already in a string format, DateTime::createFromFormat() will help you create an epoch-type integer date the object can work with. After that, it’s just getTimezone() and setTimezone().
0
solved How to convert a datetime string to UTC?