There does not seem to be a direct way to extract the time zone for a ZIP code. Currently, I am first mapping the ZIP code to the states, and then getting the time zones for those states.

"94402" //
Entity["ZIPCode", #] & //
EntityValue[#, "USStates"] & //
Map[EntityValue[#, "TimeZones"] &]

But this is obviously wrong. This will return multiple time zones even when a given ZIP code lies within a single time zone.

Is there a better way of getting the time zone for a ZIP code through Entity?

TimeZoneOffset[Entity["ZIPCode", "94402"]]


  • 1
    $\begingroup$ Ah, didn't occur to me that I don't need to wrap the entity in GeoPosition. Ah well. Graceful method :) $\endgroup$ – Carl Lange Jan 11 '19 at 0:44
  • $\begingroup$ Thank you @CarlLange. $\endgroup$ – kglr Jan 11 '19 at 1:23

This will do what you want:

TimeZoneOffset[GeoPosition[Entity["ZIPCode", "94402"]["Coordinates"]]]


Each zip code entity has coordinates associated with them, and TimeZoneOffset can take a GeoPosition and return the timezone offset from GMT.

It should be noted that kglr's answer is the shorter (and more graceful) form of this answer - they are doing the same thing under the hood.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.