logbasex
logbasex

Reputation: 2282

How does Java ZoneId.systemDefault() know about TimeZone if my computer doesn't connect to the Internet?

I'm new to Java8 Date And Time API and really curious about how a computer is aware of the time zones.

I already know a computer is aware of time by a small battery in its motherboard. Is the TimeZone similar?

Upvotes: 3

Views: 3652

Answers (1)

Horatiu Jeflea
Horatiu Jeflea

Reputation: 7404

Your time, date and timezone is locally saved on your computer. Internet is used occasionally to sync with a global trusted time so your computer does not get out of sync.

Upvotes: 1

Related Questions