Format given time

time:format(STRING $time, STRING $format="Y-m-d H:i:s.u e", STRING $timezone="") : STRING

time:format('2020-1-1', 'm/d/Y')
#=> "01/01/2020"

#=> "2020-01-01 00:00:00.000000 UTC"

# this function is the same as its PHP siblings
# to learn more read:

# note: if third argument $timezone is empty (''), this function does not try to change the timezone of the given $time, otherwise it changes it to the given timezone. If no timezone is indicated in the $time string and the $timezone is empty (''), the time is treated as UTC
$time = _time__convert_timezone($time, "UTC");

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