The goog.locale.timeZoneDetection Namespace

.detectTimeZone(opt_country, opt_date)

Detects browser's time zone setting. If user's country is known, a better time zone choice could be guessed.

opt_country {string=}
Two-letter ISO 3166 country code.
opt_date {Date=}
Date for calculating the fingerprint. Defaults to the current date.
returns {string}
Time zone ID of best guess.

.getFingerprint(date)

Calculates time zone fingerprint by poking time zone offsets for 13 preselected time points. See {@link goog.locale.timeZoneDetection.TZ_POKE_POINTS_}

date {Date}
Date for calculating the fingerprint.
returns {number}
Fingerprint of user's time zone setting.

.getTimeZoneList(opt_country, opt_date)

Returns an array of time zones that are consistent with user's platform setting. If user's country is given, only the time zone for that country is returned.

opt_country {string=}
2 letter ISO 3166 country code. Helps in making a better guess for user's time zone.
opt_date {Date=}
Date for retrieving timezone list. Defaults to the current date.
returns {Array.<string>}
Array of time zone IDs.