Page 1 of 1

Convert seconds to dateItems

Posted: Mon Apr 15, 2013 4:19 am
by Nakia
Hi All,

I am using the "convert" function to convert a GPS time (UTC/GMT) into local time.
I am using the following code but I have found that it "seems" to apply the GMT offset of the host machine when it does the conversion and I need to be able to DISABLE this and just get it convert into GMT zero offset.

As an exmaple, tSeconds = 1365975270

Code: Select all

convert tSeconds from seconds to dateItems
The result I get is = "2013,4,15,7,34,30,2" according to an online converter this is the result when you convert to my local offset (GMT+10)

anyone got any ideas?

Re: Convert seconds to dateItems

Posted: Mon Apr 15, 2013 9:43 am
by shaosean
perhaps try using the internet date function so you can get the difference between the timezone and GMT and then do some quick math..

Re: Convert seconds to dateItems

Posted: Mon Apr 15, 2013 9:59 am
by splash21
Agree with Shaosean : put word 6 of the internet date into tOffset
That's worked for me :D

Re: Convert seconds to dateItems

Posted: Tue Apr 16, 2013 5:26 am
by Nakia
Thanks guys, looked a bit painful at first but it all worked out okay...