Set time picker with specific Time Zone [duplicate]

Multi tool use
This question already has an answer here:
Setting TimeZone in DatePicker (Android)
3 answers
I am getting timezone from server as "GST".
How can I display current time in time picker in GST zone.
I am able to get by using ZoneID. But is there any ways to get proper time by timeZone("GST")
java

marked as duplicate by cнŝdk, Andrei Suvorkov, Max Vollmer, SRack, EdChum Nov 26 '18 at 9:29
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
Setting TimeZone in DatePicker (Android)
3 answers
I am getting timezone from server as "GST".
How can I display current time in time picker in GST zone.
I am able to get by using ZoneID. But is there any ways to get proper time by timeZone("GST")
java

marked as duplicate by cнŝdk, Andrei Suvorkov, Max Vollmer, SRack, EdChum Nov 26 '18 at 9:29
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
Setting TimeZone in DatePicker (Android)
3 answers
I am getting timezone from server as "GST".
How can I display current time in time picker in GST zone.
I am able to get by using ZoneID. But is there any ways to get proper time by timeZone("GST")
java

This question already has an answer here:
Setting TimeZone in DatePicker (Android)
3 answers
I am getting timezone from server as "GST".
How can I display current time in time picker in GST zone.
I am able to get by using ZoneID. But is there any ways to get proper time by timeZone("GST")
This question already has an answer here:
Setting TimeZone in DatePicker (Android)
3 answers
java

java

asked Nov 26 '18 at 6:49
mainumainu
525410
525410
marked as duplicate by cнŝdk, Andrei Suvorkov, Max Vollmer, SRack, EdChum Nov 26 '18 at 9:29
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by cнŝdk, Andrei Suvorkov, Max Vollmer, SRack, EdChum Nov 26 '18 at 9:29
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You cannot get time zone by "GST"
fun getTimeAsString(): String {
val sdf = SimpleDateFormat("HH:mm:ss")
sdf.setTimeZone(TimeZone.getTimeZone("Asia/Qatar"))
return sdf.format(Date())
}
List of Zone Ids:
https://gist.github.com/mtrung/a3f7caaa7e674ac7e6c4
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You cannot get time zone by "GST"
fun getTimeAsString(): String {
val sdf = SimpleDateFormat("HH:mm:ss")
sdf.setTimeZone(TimeZone.getTimeZone("Asia/Qatar"))
return sdf.format(Date())
}
List of Zone Ids:
https://gist.github.com/mtrung/a3f7caaa7e674ac7e6c4
add a comment |
You cannot get time zone by "GST"
fun getTimeAsString(): String {
val sdf = SimpleDateFormat("HH:mm:ss")
sdf.setTimeZone(TimeZone.getTimeZone("Asia/Qatar"))
return sdf.format(Date())
}
List of Zone Ids:
https://gist.github.com/mtrung/a3f7caaa7e674ac7e6c4
add a comment |
You cannot get time zone by "GST"
fun getTimeAsString(): String {
val sdf = SimpleDateFormat("HH:mm:ss")
sdf.setTimeZone(TimeZone.getTimeZone("Asia/Qatar"))
return sdf.format(Date())
}
List of Zone Ids:
https://gist.github.com/mtrung/a3f7caaa7e674ac7e6c4
You cannot get time zone by "GST"
fun getTimeAsString(): String {
val sdf = SimpleDateFormat("HH:mm:ss")
sdf.setTimeZone(TimeZone.getTimeZone("Asia/Qatar"))
return sdf.format(Date())
}
List of Zone Ids:
https://gist.github.com/mtrung/a3f7caaa7e674ac7e6c4
answered Nov 26 '18 at 8:44
checkichecki
64
64
add a comment |
add a comment |
zl qfAz5l1 6z gUM8WxRYV,UdCSFT340SidnJg z