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

Date and time functionsInternational functions

Function syntax

GetHttpTimeString(date_time_object)

See also

GetLocaleGetTimeZoneInfoSetLocale

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

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy