Reputation: 57196
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
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.
Upvotes: 2