473,486 Members | 2,429 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Convert date & time to time_t

I am working with an ARM946ES processor running C under Nucleus. I need to
take time and date (year, month, day, hour, minute, second) from an external
RTC chip and convert it to time_t to reset the system clock. Do you know of
a routine or library function for this conversion?

Thanks,

john
Nov 14 '05 #1
1 2870
>I am working with an ARM946ES processor running C under Nucleus. I need to
take time and date (year, month, day, hour, minute, second) from an external
RTC chip and convert it to time_t to reset the system clock. Do you know of
a routine or library function for this conversion?


Look at mktime(). It takes a struct tm (which you fill in from the
info you have) and produces a time_t.

Gordon L. Burditt
Nov 14 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1992
by: Erik Johnson | last post by:
the following script... <?php $times = array( '2004-04-04 00:31:00-06', '2004-04-04 01:00:00-06', '2004-04-04 01:59:59-06', '2004-04-04 02:00:00-06', '2004-04-04 03:00:00-06',
12
9803
by: Michael B Allen | last post by:
Are there any localized facilites for performing date arithmetic that properly considers leap years, daylight savings time, and whatever other peculiarities of the gregorian lunar calendar? ...
7
5130
by: Nimmy | last post by:
Hi, I have a file which has different dates, I want to scanf them as CHAR and convert them to DATE format, how can I do this? Thanks
6
4915
by: leorulez | last post by:
I was wondering if there is any way in C to read the date and time (either system time or from the keyboard) and see if it falls between certain date and time? I am not sure how to compare the 2...
7
37563
by: Angus Comber | last post by:
Hello I need to do this conversion but can't seem to find the function. Angus
2
18098
by: ZR | last post by:
Hello, I need to convert a GMT time string to local time. I can fill out a "tm" structure with the GMT time string. Are there any standard C (or OS) time functions that will allow me to do this? ...
3
5244
by: Magesh | last post by:
How date-time attributes of a file are represented in the structure "struct stat"? Coz as I noted they found to be unsigned integers and I donno how they are interpreted as date & time in the...
3
21942
by: pbrama | last post by:
I have a customer that supplied me with a text file that has some data and dates stored, apparently, as milliseconds since 01/01/1970 12:00a. I need to display the date/time in their application. ...
3
12332
by: Jonathan | last post by:
I have taken up C++ programming again and need to write a socket client, so far I am able to create the connection to the socket. As I need a unix timestamp in char to put on a socket in a HTTP...
0
7105
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6967
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
6846
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
5439
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,...
1
4870
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...
0
4564
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3076
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...
0
1381
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 ...
0
266
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...

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.