Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get BIOS Time in Java

Is there a way in Java to get the BIOS date and time?

Does Java use the BIOS (Basic Input/Output System) Datetime when you call java.util.Calendar.getInstance() or new java.util.Date()?

I do know that Java somehow works the current Date and time using January 1, 1970, 00:00:00 GMT as a base.

But how exactly?

like image 844
Koekiebox Avatar asked Mar 22 '26 07:03

Koekiebox


1 Answers

It asks the operating system, which may or may not ask the BIOS.

These dates are based on that epoch in this way:

new Date(0); // == Thu Jan 01 01:00:00 GMT 1970
like image 165
Matthew Gilliard Avatar answered Mar 24 '26 19:03

Matthew Gilliard



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!