Expression-field (datetime) with "Adjust" is diffe

Posted by smartsysISV on 17-Sep-2014 06:34

Different values between a field of datetime-formula with "Adjust to user time zone" and a field of datetime-expression with "Adjust to user time zone".

My timezone is +7 from server-times (GMT+1).

Formula in both fields:

var start=new Date();
start.setFullYear(2014, 8, 17, 8, 0 ,0);
return start;

Formula-field:   "17.09.2014 15:00"  This is wrong

Expr-field:    "17.09.2014 08:00"  This is OK.

If I use datetime with "No adjust" both is ok: "20.08.2014 01:00"

Is anyone else having the same problem?

Posted by Hans De Smet on 08-Dec-2014 04:19

Defect PSC00314204, that was opened for this issue, is now fixed in release 3.0.5 and 3.1.0 (See the release notes).

Hans

All Replies

Posted by Hans De Smet on 17-Sep-2014 07:18

I see this also.

Let me check this further!

Kind reagrds,

Hans

Posted by Hans De Smet on 18-Sep-2014 02:40

When I google, I see that setFullYear doesn't accept a time component: see for example here.

Using "var start = new Date(2014, 8, 17, 8, 0 ,0);" still shows the same issue, but I wanted to check if that would be what you like to use, before I open a defect for this?

These are the results I receive:

1)

var start=new Date();
start.setFullYear(2014, 8, 17, 8, 0 ,0);
return start;

>

Formula (Date/Time (Adjust to user time zone)): 17.09.2014 09:17
Expression (Date/Time (Adjust to user time zone)): 17.09.2014 16:17
Formula (Date/Time (Do not adjust)): 17.09.2014 02:17
Expression (Date/Time (Do not adjust)): 17.09.2014 02:17

2)

var start = new Date(2014, 8, 17, 8, 0 ,0);
return start;

>

Formula (Date/Time (Adjust to user time zone)): 17.09.2014 08:00
Expression (Date/Time (Adjust to user time zone)): 17.09.2014 15:00
Formula (Date/Time (Do not adjust)): 17.09.2014 01:00
Expression (Date/Time (Do not adjust)): 17.09.2014 01:00

Kind regards,

Hans

Posted by smartsysISV on 18-Sep-2014 02:45

Yes, thats correect. I have also changed this.

This is what I want, and you can open a defect for this.

Posted by Hans De Smet on 18-Sep-2014 06:20

I have opened defect PSC00314204 for this (see also KB article 000053843)!

I will update this post once the fix is available.

Kind regards,

Hans

Posted by smartsysISV on 20-Sep-2014 15:23

I read the article regarding this problem:

knowledgebase.progress.com/.../000053843

But I think the article is wrong:

Incorrect value returned in a Rollbase "Formula (Date/Time (Adjust to user time zone))" field

It is the Expression-field hat returns the wrong value.

Posted by Hans De Smet on 22-Sep-2014 03:57

Sorry, I will change this!

Seems it was mentioned incorrectly in your first note also:

Formula-field:   "17.09.2014 15:00"  This is wrong

Expr-field:    "17.09.2014 08:00"  This is OK.

Posted by smartsysISV on 22-Sep-2014 04:13

Yes, it was incorrect in  my first note.

Posted by Hans De Smet on 08-Dec-2014 04:19

Defect PSC00314204, that was opened for this issue, is now fixed in release 3.0.5 and 3.1.0 (See the release notes).

Hans

This thread is closed