473,382 Members | 1,752 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,382 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 5535
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....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.