Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Changing BIOS time from C++

Posted on 2002-04-22
1
Medium Priority
?
1,103 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 400 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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 fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

886 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