I believe I found a bug, but want to check with ev...
# adobe
r
I believe I found a bug, but want to check with everyone here first. Note: In Lucee, this works as expected. My Local time zone is EST. In CF 2023, the time_diff = 0. In Lucee, the time_diff =18000, a 5 hour time difference. The issue seems to have something to do with either dateConvert or dateDiff.
Copy code
base_epoch = createDateTime(1970, 1, 1, 0, 0, 0);
base_epoch_local = dateConvert('local2utc', createDateTime(1970, 1, 1, 0, 0, 0));
time_diff = dateDiff('s', base_epoch, base_epoch_local);

writeDump(var=[time_diff], label="time diff");
writeDump(var=[base_epoch], label="Base Epoch");
writeDump(var=[base_epoch_local], label="Base Epoch Local");
This is the Lucee output in Commandbox REPL
This is the dump found in the initial code example
r
It has something to do with how it's stored as a date in ACF. Converting to a string works.
Interesting, BoxLang also returns 0.
r
That's correct, I had to turn mine into a string and then convert it back to an object in order to make what I need to work.
I submitted a bug report to Adobe. https://tracker.adobe.com/#/view/CF-4224377