Last active
April 22, 2018 03:34
-
-
Save arjava/91c8bc141f65bf605e5f4fd76072755c to your computer and use it in GitHub Desktop.
snippet code for convert UTC to GMT using Kotlin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun convertToGmt() { | |
val sdfTime = SimpleDateFormat("HH:mm:ss") | |
sdfTime.timeZone = TimeZone.getTimeZone("UTC") | |
val dateTime = scheduleMatch.timeMatch | |
val gmtTime = sdfTime.parse(dateTime).toString() | |
println(gmtTime) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment