Heya all,

Is there a way to get the date and time that is set in the Cmos and not the date and time which is set in Windows. My Windows date and time is usually wrong.

Thanks!

Windows reads the time from the system so if one is wrong so is the other.

Thanks for the reply :->

The date and time is different in the Cmos than to Windows date and time. If you were to double click on the clock icon at the bottom of Windows desktop and set the date back say 10 days, java returns the date that is 10 days behind.

Thanks!

My educated guess is that Java wont be able to get the CMOS time. Java was made as a high level programming language and CMOS should be out of the scope of java (not 100% sure). If you wanted to do something like that i'd try to do it with C or something like that.

Ok Thanks!
Shot for the replies

Hi everyone,

If i am not wrong the Date class in java actually uses some C/C++ code to actually access the cmos date. So basically by using the java Date class you are actually already accessing the cmos date.

Richard West

But the Windows date/time comes from the CMOS! If you set the Windows date back 10 days, it will do it in the CMOS too.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.