Set time picker with specific Time Zone [duplicate]












0
















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")










share|improve this 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.























    0
















    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")










    share|improve this 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.





















      0












      0








      0









      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")










      share|improve this question















      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






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      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.


























          1 Answer
          1






          active

          oldest

          votes


















          0














          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






          share|improve this answer






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            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






            share|improve this answer




























              0














              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






              share|improve this answer


























                0












                0








                0







                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






                share|improve this answer













                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







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 26 '18 at 8:44









                checkichecki

                64




                64















                    Popular posts from this blog

                    Contact image not getting when fetch all contact list from iPhone by CNContact

                    count number of partitions of a set with n elements into k subsets

                    A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks