This is fast strftime solution without memory leak