That was perhaps not the most lucky comment you have made in your life - the time zone was actually Asia/Dubai, the time does not exist because of GMT offset advancing not spring DST clock advancing (Dubai never had Daylight Saving or Summer Time), and then there was a typo "teh" :)
Regards, - Jesper Nørgaard Welen -----Original Message----- From: Stephen Colebourne [mailto:scolebou...@joda.org] Sent: Sábado, 03 de Enero de 2009 4:33 To: Discussion of the Joda project Subject: Re: [Joda-interest] Newbie problem The date-time you are trying to create does not exist for the time zone Asia/Delhi because of teh spring DST cutover. Stephen Chandrasekhar M wrote: > Getting an error on running this program. > > Any help would be appreciated. > > > > *public* *class* Test123 { > > > > *public* Test123() { > > // *TODO* Auto-generated constructor stub > > } > > > > /** > > * *...@param* args > > */ > > *public* *static* *void* main(String[] args) { > > // *TODO* Auto-generated method stub > > > > > org.joda.time.DateTimeZone./setDefault/(org.joda.time.DateTimeZone./fo > rID/("Asia/Dubai")); > > System./out/.println(" > "+org.joda.time.DateTimeZone./getDefault/()); > > *int* year= 1920; > > *int* month= 1; > > *int* day= 1; > > *int* hour = 0; > > *int* min = 18 ; > > *int* sec = 40; > > *int* msec = 0; > > > > org.joda.time.DateTime dt = *new* > org.joda.time.DateTime(year,month,day,hour,min,sec,msec); > > System./out/.println(dt.getChronology().getZone()); > > System./out/.println(dt.toString()); > > } > > } > > > > Exception > > Asia/Dubai > > Exception in thread "main" _java.lang.IllegalArgumentException_: > Illegal > instant due to time zone offset transition: 1919-12-31T20:37:28.000 > > at > org.joda.time.chrono.ZonedChronology.localToUTC(_ZonedChronology.java:143_) > > at > org.joda.time.chrono.ZonedChronology.getDateTimeMillis(_ZonedChronology.java :119_) > > at > org.joda.time.chrono.AssembledChronology.getDateTimeMillis(_AssembledChronol ogy.java:133_) > > at > org.joda.time.base.BaseDateTime.<init>(_BaseDateTime.java:254_) > > at > org.joda.time.base.BaseDateTime.<init>(_BaseDateTime.java:195_) > > at org.joda.time.DateTime.<init>(_DateTime.java:231_) > > at com.ehis.util.Test123.main(_Test123.java:25_) > > > > Regards > > Chandra Sekhar M. > > > ______________________________________________________________________ > This email has been scanned by the MessageLabs Email Security System. > For more information please visit http://www.messagelabs.com/email > ______________________________________________________________________ > > > ---------------------------------------------------------------------- > -- > > ---------------------------------------------------------------------- > -------- > > > ---------------------------------------------------------------------- > -- > > _______________________________________________ > Joda-interest mailing list Joda-interest@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/joda-interest ---------------------------------------------------------------------------- -- _______________________________________________ Joda-interest mailing list Joda-interest@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/joda-interest Internal Virus Database is out-of-date. Checked by AVG. Version: 7.5.524 / Virus Database: 270.10.0/1864 - Release Date: 2008-12-25 9:40 Internal Virus Database is out-of-date. Checked by AVG. Version: 7.5.524 / Virus Database: 270.10.1/1867 - Release Date: 2008-12-28 14:23 ------------------------------------------------------------------------------ Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB _______________________________________________ Joda-interest mailing list Joda-interest@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/joda-interest