How to handle time zone difference between server and native android application?

前端 未结 5 1763
孤街浪徒
孤街浪徒 2021-02-19 20:52

Suppose that my server located in USA and I live in Russia. We know that they have different time zones.

My application getting text(String) from server. An

5条回答
  •  醉酒成梦
    2021-02-19 21:17

    i don't know how this can be achieved in a programmatic way but i know it can be done :) ... maybe you should try a strategy where you save all your records according to GMT time then on your client side make a formula where it checks the time zone of the client then if it was a negative time zone substitute that amount from the current time record and if it was a positive time zone add that amount to the time record this way it will show to the client according to there time zone ..... ( excuse my grammar :) wish it could )

提交回复
热议问题