/* 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
	{

    // Generating RFC 1123 text
    Instant instant = Instant.parse( "2019-09-18T20:15:32.162Z" ) ;
    OffsetDateTime odt = instant.atOffset( ZoneOffset.UTC ) ;
    String output = odt.format( DateTimeFormatter.RFC_1123_DATE_TIME ) ;
    
    System.out.println( "output: " + output ) ;
    
    // Parsing RFC 1123 text
    OffsetDateTime odt2 = OffsetDateTime.parse( output , DateTimeFormatter.RFC_1123_DATE_TIME ) ;
    
    System.out.println( "odt2.toString(): " + odt2 ) ;
	}
}