jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xor exor <makka...@gmail.com>
Subject Re: NodeType.setProperty behaviour
Date Thu, 04 Feb 2010 16:53:33 GMT
On Thu, Feb 4, 2010 at 6:08 PM, Thomas Müller <thomas.mueller@day.com>wrote:

> Hi,
>
> I think what happens is that in your getCalToGMT0 method you both
> change the timezone to UTC (which is probably what you want) but also
> the time.
>
> I would try using:
>
> Calendar c = Calendar.getInstance();
> ... set fields accordingly, if needed ...
> c.setTimeZone(TimeZone.getTimeZone("UTC"));
>

Tried that also it doesnt work :|. I created a calendar with gmt0 set attrs
and then created a fresh one as you sugested and set all fields and finally
set the timezone. That way when i enter a date 18:00 GMT+2 i got in db 19:00
GMT+3 how funny is that :)


>
> But the Calendar methods are a bit dangerous, see also
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4827490
>
> Yes Calendar and all its relatives suck in Java. Btw,thanks for your help!


> Regards,
> Thomas
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message