/* package whatever; // don't place package name! */
importjava.util.*;
importjava.lang.*;
importjava.io.*;
importjava.time.*;
importjava.time.format.*;
importjava.time.temporal.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
publicstaticvoid main (String[] args)throws java.lang.Exception
{
String input ="2018-01-02T00:03";// Text of a date with time-of-day but without any context of time zore or offset-from-UTC. *Not* a moment, *not* a point on the timeline.
LocalDateTime ldt = LocalDateTime.parse( input );// Parsing the input as a `LocalDateTime`, a class representing a date with time but no zone/offset. Again, this does *not* represent a moment, is *not* a point on the timeline.
OffsetDateTime odt = ldt.atOffset( ZoneOffset.UTC);// We are certain this text was intended to represent a moment in UTC. So correct the faulty text input by assigning the context of an offset of zero, for UTC itself.
ZoneId z = ZoneId.of("America/Chicago");// Adjust from UTC to a time zone where the wall-clock time is six hours behind UTC.