Solved

Changing BIOS time from C++

Posted on 2002-04-22
1
1,047 Views
Last Modified: 2008-03-04
Dear,

Does someone knows how to alter the hardware time under linux, from C(++) ?

I use the stime function, but this seems to change only the time of the operating system, without changing the real time clock.

Thanks,
Gregory
0
Comment
Question by:Gregory_seifert
1 Comment
 
LVL 4

Accepted Solution

by:
IainHere earned 100 total points
ID: 6963264
The hardware clock would normally be altered using /sbin/hwclock (--systohc I think).  See "man hwclock" for details.

As for calling it from your program,
(A) just call hwclock
(B) hwclock should only be executable by root (of course, any other method to set system clock should also only be usable by root :-).  If this causes problems with your program, redesign your program.  Just out of interest, why do you want to set it programatically?  Sounds like A Bad Idea.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now