/**
 * Implements the CFML Function gethttptimestring
 */
package railo.runtime.functions.dateTime;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;

import railo.commons.date.DateTimeUtil;
import railo.commons.lang.StringUtil;
import railo.runtime.PageContext;
import railo.runtime.ext.function.Function;
import railo.runtime.type.dt.DateTime;
import railo.runtime.type.dt.DateTimeImpl;

public final class GetHttpTimeString implements Function {
	
	public static String call(PageContext pc) {
		return DateTimeUtil.toHTTPTimeString(new DateTimeImpl(pc));
	}

	public static String call(PageContext pc , DateTime datetime) {
        return DateTimeUtil.toHTTPTimeString(datetime==null?new DateTimeImpl(pc):datetime);
    }
	
	public static String invoke(DateTime datetime) {
        return DateTimeUtil.toHTTPTimeString(datetime);
	}
	
	public static String invoke() {
        return call(null);
	}
}
@@ -609,16 +609,21 @@
 Impl(pc)
+,true
 );%0A%09%7D%0A%0A%09
@@ -775,16 +775,21 @@
 datetime
+,true
 );%0A    %7D
@@ -894,16 +894,21 @@
 datetime
+,true
 );%0A%09%7D%0A%09%0A

make sure the function getHTTPTimeString use the old format