Whatever message this page gives is out now! Go check it out!

GetHttpTimeString

Last update:
May 18, 2026

Description

Gets the current time, in the Universal Time code (UTC).

Returns

The time, as a string, according to the HTTP standard described in RFC 1123 and its underlying RFC, 822. This format is commonly used in Internet protocols, including HTTP.

Category

Function syntax

GetHttpTimeString(date_time_object)

See also

Parameters

Parameter
Description
date_time_object
A ColdFusion date-time object string or Java Date object

Usage

The time in the returned string is UTC, consistent with the HTTP standard.

Example

<cfscript>
    myDate="2018/05/25"
    writeOutput(getHTTPTimeString(myDate))
</cfscript>
Output
Fri, 25 May 2018 00:00:00 GMT

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page