/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

import java.time.* ;
import java.time.format.* ;
import java.time.temporal.* ;
import java.time.chrono.* ;
import java.time.zone.* ;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{


		ZoneId z = ZoneId.of( "America/Sao_Paulo" ) ;
		ZoneRules rules = z.getRules() ;
		List<ZoneOffsetTransition> transitions = rules.getTransitions() ;

		transitions.stream().forEach( System.out::println ) ;
		
		Instant instant = Instant.now();
        ZoneOffsetTransition t = rules.nextTransition( instant );
        
        // Time until next transition.
        Duration d = Duration.between( instant , t.getInstant() ) ;

        System.out.println( "t = " + t );
        System.out.println( "d = " + d );
	}
}