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.
dateConvert(conversionType, date)
→ returns date
date.convert(conversionType)
local2Utc : Converts local time to UTC time.utc2Local : Converts UTC time to local time.
local2Utcutc2Localutc_datetime = dateConvert('local2Utc', now());
This example makes sense only if your server time is UTC. now() uses your server settings when creating a datetime object.
local_datetime = dateConvert('utc2Local', now());
Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.