There is no more documentation online than the javadoc for this area.
It wasn't expected that lots of people would need to write their own
zones.

Reading the source code is the best way to understand something like
this, although it can be quite complex.

Stephen


On 17 February 2010 14:52, itin...@gmx.com <itin...@gmx.com> wrote:
> Thanks again for your reply and for pointing our the errors in my code.
>
> Is there a document that describes the DateTimeZone implementation and
> the DateTimeZoneBuilder in more detail than the javadocs?
>
> You obviously have more knowledge than is available in the api docs - is
> this available online somewhere or in the source code for Joda Time perhaps?
>
> John
>
> Stephen Colebourne wrote:
>> On 16 February 2010 13:35, itin...@gmx.com <itin...@gmx.com> wrote:
>>> Thanks for your help. I'm still not clear on a few things:
>>>
>>> 1) Do I need to specify an initial cutoff for my use case here?
>> I don't know for certain :-)
>>
>>> 2) How do I specify the last Sunday of the month - is what I have done
>>> below correct?
>> You need dayOfMonth=-1, advance=false, dayOfWeek=7
>>
>>> 3) Can I use any value for the nameKey for the recurring savings?
>> This is used to lookup a textual name for the rule, if you don't have
>> this data, anything will do.
>>
>>> 4) Under what conditions is the WKST (week start) specified in the RRULE
>>> significant?
>> It isn't. That data isn't part of the zone rule.
>>
>>> 5) Does this look correct for the VTIMEZONE information given below?
>> See the answer to question 2...
>>
>> Also, whether it should be 'w' is dependent on how the iCal spec is written.
>>
>> Stephen
>>
>>> DateTimeZone vTimeZone1 = new DateTimeZoneBuilder()
>>>   .addCutover(-2147483648, 'w', 1, 1, 0, false, 0)
>>>   .setStandardOffset(0)
>>>   //sets the start cutoff - is this needed?
>>>   .addRecurringSavings("STD", 0, 1610, 2147483648, 'w',  10, -7, 1,
>>> true, 7200000)
>>>   //line above says start DAYLIGHT savings on...
>>>   // ... go back 7 days from end of month 10
>>>   //and then forward to the first Sunday (day=1)
>>>   .addRecurringSavings("DAY",  3600, 1610, 2147483648, 'w', 3, -7, 1,
>>> true, 7200000)
>>>   //line above says start DAYLIGHT savings on...
>>>   // ... go back 7 days from end of month 3
>>>   //and then forward to the first Sunday (day=1)
>>>
>>> BEGIN:VTIMEZONE
>>> TZID:(GMT) Greenwich Mean Time - Dublin / Edinburgh / Lisbon / London
>>> BEGIN:STANDARD
>>> DTSTART:16010101T020000
>>> TZOFFSETTO:-0000
>>> TZOFFSETFROM:+0100
>>> RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=10;BYDAY=-1SU
>>> END:STANDARD
>>> BEGIN:DAYLIGHT
>>> DTSTART:16010101T010000
>>> TZOFFSETTO:+0100
>>> TZOFFSETFROM:-0000
>>> RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=3;BYDAY=-1SU
>>> END:DAYLIGHT
>>> END:VTIMEZONE
>>>
>>>
>>> Thanks
>>>
>>> John
>>>
>>> ------------------------------------------------------------------------------
>>> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
>>> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
>>> http://p.sf.net/sfu/solaris-dev2dev
>>> _______________________________________________
>>> Joda-interest mailing list
>>> Joda-interest@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/joda-interest
>>>
>>
>> ------------------------------------------------------------------------------
>> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
>> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
>> http://p.sf.net/sfu/solaris-dev2dev
>> _______________________________________________
>> Joda-interest mailing list
>> Joda-interest@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/joda-interest
>
>
> ------------------------------------------------------------------------------
> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
> http://p.sf.net/sfu/solaris-dev2dev
> _______________________________________________
> Joda-interest mailing list
> Joda-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/joda-interest
>

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to