Solved

Changing BIOS time from C++

Posted on 2002-04-22
1
1,075 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how does yum update work 2 73
Automating a set of commands run on linux 7 106
busybox bash/ash - bash -x | grep 19 209
bash file 10 89
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…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

752 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