Hi Paul,

Sorry, but, nothing wrong to me here:

DateTime now = new DateTime(2007, 10, 28, 01, 20, 0, 0,
DateTimeZone.forID("Europe/Dublin") );
                
out.println(now + " " + now.getZone()); //2007-10-28T01:20:00.000Z Europe/Dublin

now = now.plusHours(1);
                
out.println(now + " " + now.getZone()); //2007-10-28T02:20:00.000Z Europe/Dublin

1) What's the VM default timezone? GMT? If yes, you can change it to
Europe/Dublin using  System.setProperty?

2) Do you update the TZ information in Joda-time jar file, to
recognize the summer time in Europe/Dublin? (I don't know if your ST
is fixed or not) Instructions you find in
http://joda-time.sourceforge.net/tz_update.html

3) Do you see the problem with now.plusHours(1) when you insert this
time in an database? If yes, remember: the DateTime class is
immutable; when you call new DateTime with parameters, only the fiels
are updated (year, month, day, hour, minute, second). The
getTimeInMillis is not updated. Use MutableDateTime instead.


2007/10/24, Paul Nolan <[EMAIL PROTECTED]>:
> Hi there,
>
> I live in Ireland. It is currently IST - Irish Summer Time.
>
> On the 28th October 2007 at 02:00 AM the clocks will go backwards one hour
> to 01:00 AM GMT.
>
> So, in effect, there are two 01:01 AM's, two 01:02 AM's etc. One in IST and
> one in GMT.
>
> My question is this:
>
> If I execute the code:
>
>         DateTime now = new DateTime(2007, 10, 28, 01, 20, 0, 0,
> DateTimeZone.forID("Europe/Dublin") );
>
> It defaults to 01:20 GMT. So, naturally if I execute:
>
>         now = now.plusHours(1);
>
> The time is now 02:20 GMT.
>
> How do I tell DateTime to assume IST? I tried with the time zone ID "IST"
> but it is not recognised...I know these have been deprecated.
>
> In other words how do I do something like:
>
>         DateTime now = new DateTime(2007, 10, 28, 01, 20, 0, 0,
> DateTimeZone.forID("IST") );
>
> To get: 01:20 IST
>
>         now = now.plusHours(1);
>
> I get 01:20 GMT?
>
> thanks,
>
> - Paul.
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Joda-interest mailing list
> Joda-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/joda-interest
>
>


-- 
Rodrigo de Avila
[EMAIL PROTECTED]

http://www.avila.eti.br

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to