I want to get current date and time in NASM, in some usable format. I know how to get timestamp (with system call sys_time), but there is a lot of work to get usable date and time from timestamp. You would need to calculate every year, month, day and take in account every leap year, leap seconds (how many they were so far? and I cant predict future leap seconds), so I think, there should be a way OS can handle this.
So my question is: Is there a way to get current date and time in usable way so I don't have to calculate it from timestamp?
OS I am using: CentOS 7
According to some, my question is same as: How can I access system time using NASM? well, that's not really true. My question is more specific (that I don't want timestamp) and answers from the above won't help me, because either give me timestamp or don't work at all. Most rated answer count on instruction OUT, which leads to Sefmentation fault on my system.