Skip to main content
Armin Choopani
Associate II
January 28, 2019
Question

Getting Time Based On The Place I Live

  • January 28, 2019
  • 3 replies
  • 1570 views

Hi everyone,

I have designed a module with STA 8089GA which works properly. It gives me the exact position and fixes in less that a minute. I wanted to read time with this module. When I tried "PSTMGETRTCTIME" and "PSTMRTCTIME", it gives me time based on Greenwich. But I want the time based on the zone I live. I wonder how can I get the time based on the zone I live? Or generally is it possible?

I appreciate any help in advance

Best Regards

Armin

    This topic has been closed for replies.

    3 replies

    Tesla DeLorean
    Guru
    January 28, 2019

    Time zones and daylight savings protocols tend to fall along geopolitical boundaries, you'd need to map those to make a determination of the adjustment necessary, or hard code a simpler value.

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    Armin Choopani
    Associate II
    January 28, 2019

    Thanks for your response, but, unfortunately I didn't got what you mean.

    PTsen
    Associate III
    January 28, 2019

    I think you can calculate it base on the longitude where you live, say GMT + x, and +1 (or -1?) for daylight saving, but for some country, the time is universal no matter the time zone you are in, so it is also based on the political consideration of that country. I think that's the reason why @Community member​  suggest hard code a simpler value.