Last updated
Was this helpful?
Last updated
Was this helpful?
Converts local time to Coordinated Universal Time (UTC), or UTC to local time.
The function uses the daylight savings settings in the executing computer to compute daylight savings time, if required.
Result: {ts '2025-05-27 05:12:10'}
This example makes sense only if your server time is UTC. now() uses your server settings when creating a datetime object.
Result: {ts '2025-05-26 22:12:10'}
conversionType
string
true
The conversion type. Valid values are "utc2Local" and "local2Utc".
date
any
true
The date to convert.