473,651 Members | 3,012 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Setting Time/Date in linux??

109 New Member
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 5557
Motoma
3,237 Recognized Expert Specialist
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 New Member
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 Recognized Expert Specialist
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
shahjapan
63 New Member
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
shahjapan
63 New Member
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 New Member
/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 Recognized Expert Specialist
Check out the rdate man page.
Jul 12 '07 #8
skyy
109 New Member
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 Recognized Expert Specialist
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

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

Similar topics

8
9435
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 $ Last-Modified: $Date: 2003/10/28 19:48:44 $ Author: A.M. Kuchling <amk@amk.ca> Status: Draft Type: Standards Track
6
12911
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 here put me straight on the following: I had a look at the time() function came across this: "To clarify, it seems this function returns the time of the computer's clock and does not do any timezone adjustments to return GMT, so you are...
1
4607
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 same as it used to. And, upgrading is easy but downgrading is nearly impossible. Apart from having one machine per browser, how can I manage this? What are the sources for downloading the various browsers?
18
18354
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 a remote update of tables and fields and can't find enough information on these things. Also, how do you index a field in code?
8
2258
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 happens. dim filt as string ... build filter string... UserControl.ReportFilter = filt
4
4789
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 broadcast)---------------------------
5
3159
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 client/user code be responsible for doing it? On what basis should a decision be made favouring either case ?
37
4668
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 leap second? By "Unix time" I mean the integer returned by time() and similar functions. I'm concerned about the "down" case. Some of the software I've written
9
7236
by: Aditi | last post by:
I am working around a problem called Y2038 bug. http://groups.google.co.in/group/comp.unix.programmer/browse_thread/thread/a2f678e4f2761fb0/2816aaf1f50f863e?hl=en&lnk=st&q=time.h+64+bit+linux#2816aaf1f50f863e I am developing an application which need to be built both on windows and linux and used time_t, ctime, mktime, localtime and gmtime functions from <time.h>. The application already exists and I have to replace these 32bit time...
0
8701
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8466
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8584
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6158
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4144
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4290
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2701
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1912
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1588
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.