hari
hari

Reputation: 9733

how to interpret this timestamp?

Lets say this is the time-stamp: 2011-07-06T00:00:35.851-07:00

What does that tell me? This is how I am trying to understand it:

2011-07-06 - date
00:00:35   - hh:mm:ss
851        - micro seconds??
07:00      - what does that tell me?

I need to convert this to UTC if possible with C.

Edit 0: Thanks for the responses by @RichieHindle and @Marc B. I now understand the GMT offset. My problem now is, I am not getting correct value out of getdate.

Upvotes: 3

Views: 2863

Answers (2)

Marc B
Marc B

Reputation: 360762

It says it's July 6th, 2011, 35.851 seconds past midnight, in the GMT-7 time zone. To convert to UTC (GMT-0 timezone), you'd need to add 7 hours (-7 + 7 = 0), making it 2011-07-06T07:00:35.851-00:00

Upvotes: 5

RichieHindle
RichieHindle

Reputation: 281695

851 is milliseconds (thousandths of a second) and -07:00 is the timezone (UTC minus 7 hours).

Upvotes: 4

Related Questions