|
Forum Index : Microcontroller and PC projects : Unixtime function added to library
| Author | Message | ||||
| CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 2171 |
Those of you who work with larger systems may be familiar with the concept of Unixtime (sometimes called Epochtime) I added a function for this calculation today here Unixtime is the elapsed seconds since 01-01-1970 00:00:00 and as a straight numerical format eliminates the confusion between the various date string formats. It is only whole seconds (some go down to mS) I will post a "HumanTime" function soon (when I get round to writing it) to provide conversion back and forth between the two I have tested with extremes and known dates and it looks good when compared to big-boys computers. |
||||
| twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1772 |
Hi Captain Boing! Thank you for the efforts. I wanted to have that for a long time. Congratulation! Regards Michael ‚My name is Ozymandias, king of kings Look on my works, ye Mighty, and despair!‘ Nothing beside remains. Round the decay Of that colossal wreck, boundless and bare The lone and ... |
||||
| CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 2171 |
no probs, u r welcome. I will write the reverse function soon (probably this weekend). Unixtime is a nice compact date/time method - it is vital for logging on small storage/memory systems - like micromites. |
||||
| CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 2171 |
updated the function to be more flexible with how the date string is interpretted |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2026 |