How to translate a mach_timespec to "yyyy.mm.dd hh:mm:ss"
How to translate a mach_timespec to "yyyy.mm.dd hh:mm:ss"
- Subject: How to translate a mach_timespec to "yyyy.mm.dd hh:mm:ss"
- From: Timothy Standing <email@hidden>
- Date: Thu, 24 Jul 2003 16:11:19 -0700
I am trying to find a way to generate a string which contains the
current time in the "yyyy.mm.dd hh:mm:ss" format. It seems like I
should just be able to call clock_get_calendar_value() to get a
mach_timespec_t and then call some function to translate this into a
posix struct tm. Unfortunately, I can't find a function in the
kernel which performs this second step.
Does anyone know of a way to perform the conversion from a
mach_timespec_t to a structure which contains the values for year,
month, day etc?
Does anyone know how IOLog() generates this information?
Thanks in advance,
Tim Standing
SoftRAID, LLC
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.