I once had to write one for a project. It's not that complicated to simply convert an 32 bit integer to a GTM time if you cut the corners. Since we had no big requirements, here what we had not done: - Leap seconds handling - Timezone handling - Localize printf
Basically we only had unix2struct, struct2unix and a print time function. I think it would be hard to have a library that would match a UNIX system. We were always a few second off from a computer but it didn't cause any issue for us at the time. if your interested i could post our code, mind you the time to string function yield result in French, but that is just some constant string to change. At the time I was looking to do something decent for asctim() but then it depends on where you are in the world for daylight saving as well as the mood of the head of the country to decide to change the dates at which saving day light is used. I know OpenBSD uses a file in /etc to solve the issue. It's only 34bytes(fits well in either ram/programspace/eeprom) but it's only for /Canada/Eastern. It became quite complicated for our requirements at the time. -- Frédéric Nadeau ing. jr _______________________________________________ AVR-libc-dev mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/avr-libc-dev
