Set time picker with specific Time Zone [duplicate]
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 android android-timepicker
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 android android-timepicker
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 android android-timepicker
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 android android-timepicker
java android android-timepicker
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 |