cancel
Showing results for 
Search instead for 
Did you mean: 

New Java API and DateTimeValue (hour issue)

Former Member
0 Kudos

Hi All,

do anybody have experience with new java API and DateTimeValue value type (package: com.sap.mdm.valuetypes). Seems that this class / constructor is invalid due to incorrect hour interpretation.

Constructor of this class takes Calendar object and ignore 24-hour hour format (HOUR_OF_DAY element of calendar object) and only use Calendar.HOUR element ignoring the AM/PM indicator.

To check this simply create DateTimeValue object using Calendar object with hour between 13 and 23.

Anybody faced this problem (or maybe again I'm doing something wrong) ?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

This looks like a bug in SP4 Patch 3.

Calendar calendar = Calendar.getInstance();

DateTimeValue dateTimeValue = new DateTimeValue(calendar);

While debugging I get these values..

calendar.getTime()

(java.util.Date) Wed Apr 18 <b>13:41:13</b> CDT 2007

dateTimeValue.toString()

(java.lang.String) 04/18/2007 <b>01:41:13</b>

Please open a OSS message.

Former Member
0 Kudos

Thx for verification.

Regards, marcin

Answers (0)