private static final DateTimeZone SAO_PAOLO = DateTimeZone.forID("America/Sao_Paulo");
private static final DateTimeZone CHICAGO = DateTimeZone.forID("America/Chicago");
public static void main(String[] args) {
DateTimeFormatter fmt = DateTimeFormat.forPattern("yyyy-MM-dd'T'HH:mm:ssZZ");
//Setting 2011 Fall DST day.
DateTime st = new DateTime(2011, 11, 6, 0, 0, CHICAGO);
DateTime et = new DateTime(2011, 11, 6, 0, 0, CHICAGO);
//======================================
for (int i = 0; i <= 24; i++) {
try {
if (i > 0) {
st = st.minuteOfDay().addToCopy(60);
}
et = et.minuteOfDay().addToCopy(60);
System.out.println("START TIME = { " + fmt.print(st)
+ " } END TIME = {" + fmt.print(et) + " }");
} catch (Exception e) {
e.printStackTrace();
}
}
//=====================================