What time zone are the devices/server running on?

UmarAminUmarAmin USMember ✭✭

Hi, I have a little problem regarding time zones.
I have a test where I am trying to check that a time stamp is correct in our app.
I am using ruby to get the current time (local from where the server is located) and then compare it to the text field in the app (which should be according to the phones date/time settings).
The problem is that I get different results every time. Sometimes the time in the phone is one hour ahead and sometimes it's one hour behind.

Do you guys at xamarin have something specific set up for this? Or can I just not rely on that the phones date/time settings will be the same as the server?

(tested on an Android LGE 4.4.4)

Best Answer

Answers

  • GeraldVersluisGeraldVersluis NLUniversity ✭✭✭✭

    When creating a new app (or TestRun) you can set the device language. Isn't this also used to set the timezone etc.?

  • lanzelot1989lanzelot1989 ATMember ✭✭

    I would suspect (as the devices are located in Denmark - as far as I know) that the time zone is CEST.

  • UmarAminUmarAmin USMember ✭✭
    edited April 2016

    Yeah, that's what I would have expected. And that also seems to be what the server returns when I check the current time using ruby.
    The phone I just tested on though (like 15 minutes ago) shows a screenshot with the time 13:17 in the device, i.e. two hours behind CEST.

    (but other times it has been correct.. so it seems to differ)

  • UmarAminUmarAmin USMember ✭✭

    @Glenn.Wilson said:
    @UmarAmin That sounds like an error on that device. I have found a few with incorrect times and we are looking into this. The devices should have accurate local time (CEST).

    Thank you! I've switched to another device now and it seems to work much better!

Sign In or Register to comment.