473,395 Members | 1,941 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Setting Time/Date in linux??

109 100+
Hi..

I am working on Arm-linux os on developement board. The OS reset the time and date whenever the board is reset. Is there any way that i can run a script to set the time/date instead of manually setting it?

Thanks..
Jul 3 '07 #1
12 5537
Motoma
3,237 Expert 2GB
Hi..

I am working on Arm-linux os on developement board. The OS reset the time and date whenever the board is reset. Is there any way that i can run a script to set the time/date instead of manually setting it?

Thanks..
Provided the board has network access, you may want to get NTP set up and running. Otherwise you will need to keep power to the device even when it is off.
Jul 3 '07 #2
skyy
109 100+
Provided the board has network access, you may want to get NTP set up and running. Otherwise you will need to keep power to the device even when it is off.
Yup.. so how do i get that running? thanks...
Jul 4 '07 #3
Motoma
3,237 Expert 2GB
Yup.. so how do i get that running? thanks...
I proposed two solutions, which one are you trying to figure out?
Jul 5 '07 #4
I proposed two solutions, which one are you trying to figure out?
The OS reset the time and date whenever the board is reset
means that your battery on the M/B is out of date, instead of finding other solutions you should update your battery asasp
Jul 6 '07 #5
means that your battery on the M/B is out of date, instead of finding other solutions you should update your battery asasp

/usr/sbin/ntpdate -v 130.133.1.10 131.188.3.220 193.67.79.202 ; /sbin/hwclock --systohc > /dev/null 2>&1
Jul 6 '07 #6
skyy
109 100+
/usr/sbin/ntpdate -v 130.133.1.10 131.188.3.220 193.67.79.202 ; /sbin/hwclock --systohc > /dev/null 2>&1
hi.. thanks for the reply..

But i cant find the ntpdate function anywhere. Instead i got this "rdate" function which is part of busybox. Any idea how to use it?
Jul 12 '07 #7
Motoma
3,237 Expert 2GB
Check out the rdate man page.
Jul 12 '07 #8
skyy
109 100+
Check out the rdate man page.

Hi.. thanks for the link. What should i set for the host?
Jul 12 '07 #9
Motoma
3,237 Expert 2GB
Hi.. thanks for the link. What should i set for the host?
I think ntp.org keeps a listing of servers. You could try searching their list for one that is close to you geographically, or you could just use pool.ntp.org.
Jul 12 '07 #10
skyy
109 100+
I think ntp.org keeps a listing of servers. You could try searching their list for one that is close to you geographically, or you could just use pool.ntp.org.
Hi thanks for the link...

But when i try with pool.ntp.org, "rdate" return with an error: Host name lookup failure.

I tried other time server also gives me the same error.
Any idea?
Jul 13 '07 #11
Motoma
3,237 Expert 2GB
Hi thanks for the link...

But when i try with pool.ntp.org, "rdate" return with an error: Host name lookup failure.

I tried other time server also gives me the same error.
Any idea?
Sounds like you don't have internet access. Can you ping google from the device?
Jul 13 '07 #12
skyy
109 100+
Sounds like you don't have internet access. Can you ping google from the device?
Hi.. yah i got problem with my internet access. I can't ping google from the device. But my device is connected to a nework router. why it is not able to access internet?
Jul 17 '07 #13

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Gerrit Holl | last post by:
Posted with permission from the author. I have some comments on this PEP, see the (coming) followup to this message. PEP: 321 Title: Date/Time Parsing and Formatting Version: $Revision: 1.3 $...
6
by: David Graham | last post by:
Hi I have asked this question in alt.php as the time() function as used in setcookie belongs to php - or does it belong equally in the javascript camp - bit confused about that. Anyway, can anyone...
1
by: Steven Dilley | last post by:
I need some advice. How do you set up a test environment, with every possible browser? My past experience is that once you install a new version, the old version my not necessarily behave the...
18
by: Dixie | last post by:
Can I set the Format property in a date/time field in code? Can I set the Input Mask in a date/time field in code? Can I set the Format of a Yes/No field to Checkbox in code? I am working on...
8
by: David Lozzi | last post by:
Howdy, I have a user control that is a report to display data. On the page the control is inserted in, I have filter options to filter the report. When I try to do something like this, nothing...
4
by: Anony Mous | last post by:
Hi, Is there a function that would allow me to set the local time while the server is running? I can't seem to find anything on this... Thanks, Peter ---------------------------(end of...
5
by: Amogh | last post by:
Hi, My question is related to setting freed pointers to NULL. After freeing a pointer: 1) Should the freeing routine also be responsible for setting the pointer to null? 2) Or, should the...
37
by: David T. Ashley | last post by:
I have Red Hat Enterprise Linux 4. I was just reading up about UTC and leap seconds. Is it true on my system that the Unix time may skip up or down by one second at midnight when there is a...
9
by: Aditi | last post by:
I am working around a problem called Y2038 bug....
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.