Q:

How do I convert CFAbsoluteTime to YYYY-MM-DD HH:MM:SS format?

How do I convert CFAbsoluteTime structure to YYYY-MM-DD HH:MM:SS format ?

A:

You could use this piece of code (pure CoreFoundation):
CFAbsoluteTime cfTime = CFAbsoluteTimeGetCurrent();
CFDateRef cfDate = CFDateCreate(kCFAllocatorDefault, cfTime);
CFDateFormatterRef dateFormatter = CFDateFormatterCreate(kCFAllocatorDefault, CFLocaleCopyCurrent(), kCFDateFormatterFullStyle, kCFDateFormatterFullStyle);
CFStringRef newString = CFDateFormatterCreateStringWithDate(kCFAllocatorDefault, dateFormatter, cfDate);
CFRelease(dateFormatter);
CFRelease(cfDate);

kCFDateFormatterFullStyle characterizes format. Choose one that suits you better :)

