Change the timezone of given timestring

time:convert_timezone(STRING $time, $new_timezone) : STRING

time:convert_timezone("2020-01-06 14:17:43.065242 EST", "UTC")
#=> "2020-01-06 19:17:43.065242 UTC"


time:convert_timezone("2020-1-1 00:00 UTC", "PST")
#=> "2019-12-31 16:00:00.000000 PST"

# default timezone of all time strings without a timezone at the end is UTC
time:convert_timezone("2020-1-1 00:00", "UTC")
#=> "2020-01-01 00:00:00.000000 UTC"

Copyright ©2013-2022 SunSed®. All rights reserved.