How to Change time format of date string using timeoffset [duplicate]
问题 This question already has answers here : Strange Java Timezone Date Conversion Problem (3 answers) Closed 10 months ago . I am trying to convert date string to UTC format from another time zone in Java. we have only time zone offset like "-06:00". Can any one help me how to convert the date time to UTC format using time zone offset. Thanks This for java version 1.7 . I have tried with following snippet but receiving the same input as output. String dateInString = "02/04/2019 18:17:15";