You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Cimballi <ci...@cimballi.net> on 2009/06/05 20:56:28 UTC

Help need for setting date fields in Delivery entity

Hi,

I face a problem while try to set date fields in Delivery entity.
I set a date with an hour, I check before calling the store method
that the hour is well fixed in the entity, but after the call to the
store nethod, the date is set with an hour to 00:00.

Do you have an idea about what could be the problem or what I am doing wrong ?

The problem is not present in WebTools, here it works well, but I
think WebTools use another method than "store", not sure...

Thanks,

Cimballi

Re: Help need for setting date fields in Delivery entity

Posted by Cimballi <ci...@cimballi.net>.
Ok, I found the answer, this is because I use a java.util.Date which
is converted by OFBiz in a java.sql.Date which reset the hour field.
I suppose I should use a Timestamp object.

Is there any particular reason for which you use a java.sql.Date for
the conversion and not a Timestamp object ?

Cimballi


On Fri, Jun 5, 2009 at 1:56 PM, Cimballi<ci...@cimballi.net> wrote:
> Hi,
>
> I face a problem while try to set date fields in Delivery entity.
> I set a date with an hour, I check before calling the store method
> that the hour is well fixed in the entity, but after the call to the
> store nethod, the date is set with an hour to 00:00.
>
> Do you have an idea about what could be the problem or what I am doing wrong ?
>
> The problem is not present in WebTools, here it works well, but I
> think WebTools use another method than "store", not sure...
>
> Thanks,
>
> Cimballi
>