|
Forum Index : Microcontroller and PC projects : Unix Time
| Author | Message | ||||
| viscomjim Guru Joined: 08/01/2014 Location: United StatesPosts: 925 |
Has anyone in this forum ever written an MMbasic function to convert the UNIX time to a normal TIME$, DATE$ type of thing? |
||||
TassyJim![]() Guru Joined: 07/08/2011 Location: AustraliaPosts: 6349 |
Yes. But - Until we get 32 bit integers, the range of dates that can be used is too limited to be of use. 16777100 seconds is only 194 days. Even 32 bits will cause problems (for a lot of Unix based devices) in a few years. You can use my arbitrary length Integer maths but it would be rather slow. I have been working on a library of date conversion routines including Julian day numbers. By sticking to whole days and treating the part day as a separate variable, reasonable things can be done. While working on this, I discovered that one of the common formulas available on the net was faulty. It took a while to find and test a reliable one. You will have to be patient for a little while longer. Jim VK7JH MMedit |
||||
| viscomjim Guru Joined: 08/01/2014 Location: United StatesPosts: 925 |
Hi TJ, (btw what is tassy?) That sound good, Can't wait to see your results. I never heard of this unix time thing till just recently and now it is coming up more and more. Weird.... |
||||
TassyJim![]() Guru Joined: 07/08/2011 Location: AustraliaPosts: 6349 |
Australia has two main islands. The one to the north we call "the mainland" The one to the south where all the best people live is "Tasmania" Jim (ducking quickly to hide from the flack about to come from the north island) VK7JH MMedit |
||||
| BobDevries Senior Member Joined: 08/06/2011 Location: AustraliaPosts: 266 |
Hey TassyJim, You forgot the two de facto island states to the east, also known as New Zealand. Puts on fireproof coat... Bob Devries Dalby, QLD, Australia |
||||
| paceman Guru Joined: 07/10/2011 Location: AustraliaPosts: 1329 |
I've been living on the bigger "North" island for 35 years now Jim but Tassy, I usually spell it Tassie is still home to me. FYI, people living in Tassie(y) are also known as "Taswegians" as well as Tasmanians. Because of its better quality of life, jealous "mainlanders" are fond of telling a very tired joke about Tasmanians having a scar where their second head was removed
Greg |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |