Instead of having CF do formatting, I would put forward a standardized representation of the date (for example, UTF (and JavaScript date format). Thus, the date is formatted to any time zone installed on the computer.
This allows you to avoid incorrect searches near zones of change of zones associated with summer savings compared to areas where this is not observed, and people traveling (formatting for "home time" compared to "local time").
Added:
Resets the current time in long format. This is a semi-off-cuff, so you want to look at the JavaScript Date Object for more formatting options.
<cfset n = dateconvert("local2utc",now())> <script> d = new Date(); d.setUTCFullYear(#dateformat(n, "yyyy")#); d.setUTCMonth(#dateformat(n, "m")#); d.setUTCDate(#dateformat(n, "d")#); d.setUTCHours(#timeformat(n, "H")#); d.setUTCMinutes(#timeformat(n, "m")#); document.write(d.toLocaleString()); </script>
source share