This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to time.h functions for Calander management

I have LPC2132 based board with DS3231 RTC. The system is master clock which supports the GMT, IST, UTC time format. It is also connected to GPS which sends in UTC mode.
At present, I have own functions to support the conversions in user selected mode from others.
Does it possible to use lib function to do the same?
I can read the RTC every second can fill the local registers if needed. My aim to use the lib function to keep my implementation simple and clean and hide the programming.

Parents Reply Children
  • But have you then considered looking at the documentation available from Keil?

    If Keil have implemented the functions, it would be logical for Keil to also have documentation telling what you, as the developer, must do with your custom hardware, to make the Keil libaries be able to perform their task.

    Next thing is that most of the functions listed in time.h perform their work based on data you supply. If you have a time_t value storing a time in seconds since 1970-01-01 00:00:00, then this can be used as an input to convert the time into year, month, day, hour, minutes, seconds. Just make sure you take a closer look at the implications about time zone since this is an embedded project where the conditions are a bit different compared to a PC.

  • "I want to know, how and where to update the time/date structure so variables are updated"

    Did you somehow miss this part of my previous post:

    "You will, of course, have to study the documentation for the particular library to find out how to use it..."