dateConvert() is not converting UTC correctly

Description

The dateConvert() function when using *utc2local* is not converting it correctly.

However, when I go directly to Java it works correctly:

Am I missing something?

Environment

None

Activity

Luis Majano 30 November 2016 at 16:55

Yes Especialy now adays where you work so much with JavaScript frameworks which usually support the milliseconds since epoch approach. We really need a native CFML function to deal with that and conversions.

I would suggest your read up on http://momentjs.com/

It is a tremendous library for dealing with this nasty issue of dates/times/timezones

Michael Offner 30 November 2016 at 08:56

we should maybe to a function that allow this:

Michael Offner 30 November 2016 at 08:49
Edited

java.util.Date.<init>(long) constructor takes milli seconds since 1/1/1970 00:00:00 UTC. CFML on other side interprets a number as days since 1899-12-30 00:00:00. You also should never use that function, for details read the doc of that function.
http://docs.lucee.org/reference/functions/dateconvert.html

Fixed

Details

Assignee

Reporter

Priority

Labels

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Created 26 June 2015 at 14:37
Updated 23 April 2022 at 17:00
Resolved 30 November 2016 at 08:53