tl;dr
LocalDateTime // Represent a date wih time-of-day but lacking he context of a time zone or offset.
.parse( "2010-01-01T00:43:54.776000" ) // Parse your standard ISO 8691 text with microseconds. Returns a `LocalDateTime` object. This is *not* a moment, *not* a point on the timeline.
.atOffset( ZoneOffset.UTC ) // Apply an offset to determine a moment. Returns an `OffsetDateTime` object.
.toString() // Generate text in standard ISO 8691 format.
java.time
Stop using terrible date-time classes that were supplanted years ago by the modern java.time classes.
Always search Stack Overflow thoroughly before posting. All this has been covered many times already, so I’ll be brief.
LocalDateTime ldt = LocalDateTime.parse( "2010-01-01T00:43:54.776000" ) ;
OffsetDateTime odt = ldt.atOffset( ZoneOffset.UTC ) ;
Generate text in the standard ISO 8601 format.
String output = odt.toString() ;

About java.time
The java.time framework is built into Java 8 and later. These classes supplant the troublesome old legacy date-time classes such as java.util.Date
, Calendar
, & SimpleDateFormat
.
To learn more, see the Oracle Tutorial. And search Stack Overflow for many examples and explanations. Specification is JSR 310.
The Joda-Time project, now in maintenance mode, advises migration to the java.time classes.
You may exchange java.time objects directly with your database. Use a JDBC driver compliant with JDBC 4.2 or later. No need for strings, no need for java.sql.*
classes. Hibernate 5 & JPA 2.2 support java.time.
Where to obtain the java.time classes?