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?
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
I see this also.
Let me check this further!
Kind reagrds,
Hans
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
Yes, thats correect. I have also changed this.
This is what I want, and you can open a defect for this.
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
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.
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.
Yes, it was incorrect in my first note.
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