How does Maps on Mac OS determine the computer's location
Apple is using Core Location code that's mostly common to iOS and OS X and the primary signal your Mac has to determine location is detected wireless hotspot serial numbers (SSID and MAC address if available).

Also, by tracing the IP address for Macs with active connections to the internet, often that will at least get you in the proper time zone and occasionally in the proper zip code (or postal code for people outside the US).