tracker issue : CF-3041878

select a category, or use search below
(searches all categories and all time range)
Title:

Bug 83808:[pfarrell] Working with HTTP time string dates is a pain in CFML because there is no built in function that converts a HTTP time string into a CFML datetime

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Peter Farrell / Peter Farrell (MaestroFJP)

Created: 08/11/2010

Components: Language, Functions

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 / 278942

Priority/Frequency: Normal / Unknown

Locale/System: English / Platforms All

Vote Count: 1

Problem:

[pfarrell] Working with HTTP time string dates is a pain in CFML because there is no built in function that converts a HTTP time string into a CFML datetime.  I propose this function.createDatetimeFromHttpTimeString(httpTimeString:string) -> CFML dateBelow is a concept in CFML:<cffunction name="createDatetimeFromHttpTimeString" access="public" returntype="date" output="false"hint="Creates an UTC datetime from an HTTP time string."><cfargument name="httpTimeString" type="string" required="true"hint="An HTTP time string in the format of '11 Aug 2010 17:58:48 GMT'." /><cfset var rawArray = ListToArray(ListLast(arguments.httpTimeString, ","), " ") /><cfset var rawTimePart = ListToArray(rawArray[4], ":") /><cfreturn CreateDatetime(rawArray[3], DateFormat("#rawArray[2]#/1/2000", "m"), rawArray[1], rawTimePart[1], rawTimePart[2], rawTimePart[3]) /></cffunction>This has been entered as issue 907 in Railo as well:https://jira.jboss.org/browse/RAILO-907This has been entered as issue 260 in OpenBD. as wellhttp://code.google.com/p/openbluedragon/issues/detail?id=260 
Method:


Result:

[pfarrell]

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3041878

Deployment Phase:	Release Candidate

External Customer Info:
External Company:  
External Customer Name: Peter Farrell
External Customer Email: 49ED14CD43A7342099201674
External Test Config: 08/11/2010

Attachments:

Comments: