/* 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.* ;

/* 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
	{
		OffsetDateTime odt = OffsetDateTime.now() ;
		OffsetDateTime odtTruncated = OffsetDateTime.now().truncatedTo( ChronoUnit.MILLIS ) ;
		
		System.out.println( "odt.toString(): " + odt ) ;
		System.out.println( "odtTruncated.toString(): " + odtTruncated ) ;
		
		Instant instant = Instant.now() ;  // Current moment in UTC.
		ZoneOffset offset = ZoneId.of( "Asia/Kolkata" ).getRules().getOffset( instant ) ;  // We must pass a moment. India is currently at five and a half hours ahead of UTC. But it has not always been so in the past, and may not always be so in the future.
		OffsetDateTime odtKolkata = instant.atOffset( offset ) ;
		
		System.out.println( "odtKolkata.toString(): " + odtKolkata ) ;

		String output = ZonedDateTime.now( ZoneId.of( "Asia/Kolkata" ) ).toOffsetDateTime().toString() ;
		System.out.println( "output: " + output ) ;
	}
}