Run
Run

Reputation: 57196

Google map - which are local and utc time?

I have this timezone result from google map, for instance,

{
   "dstOffset" : 0.0,
   "rawOffset" : -28800.0,
   "status" : "OK",
   "timeZoneId" : "America/Los_Angeles",
   "timeZoneName" : "Pacific Standard Time"
}

which one is local time and which one is utc time?

Upvotes: 0

Views: 510

Answers (1)

Beamer
Beamer

Reputation: 828

dstOffset: the offset for daylight-savings time in seconds. This will be zero if the time zone is not in Daylight Savings Time during the specified timestamp.

rawOffset: the offset from UTC (in seconds) for the given location. This does not take into effect daylight savings.

Calculating the Local Time: The local time of a given location is the sum of the timestamp parameter, and the dstOffset and rawOffset fields from the result.

The Google Time zone API

Upvotes: 2

Related Questions