2 years ago

#74690

test-img

Daniil Kunin

How to handle incorrect system time (offset from the system timezone) on device?

I know this is a relatively popular question, but the answers which I found didn't cover the following use case:

Let's consider that a user has Europe/Moscow timezone set on device which means it is GMT+3

But user also has own offset of 10 minutes, so if real GMT+0 = 13:00, then time on device = 16:10. And this offset could be different: x seconds,y minutes,z hours...

My question is how to get the offset of the device time from the GMT+0 when you have set personal offset for system time?

So not only the timezone whichs mean nothing when you have incorrect time on device.

P.s. this offset could be achieved on iPhone via disabling 'Automatically defining time' in Settings/General/Date&Time and picking any time/timezone.

Thank you in advance

ios

react-native

timezone

momentjs

timezone-offset

0 Answers

Your Answer

Accepted video resources