Epoch -> string convertion functions?

James Bailie jimmy at jamesbailie.com
Sat Apr 22 21:31:50 UTC 2006

Gary Kline wrote:

 >  In looking over my old C code I've come across lots of
 >  unexpected functions, but nothing that, say, given the long
 >  int that represents the Epoch can turn it into something
 >  useful.  Anybody know of any "off-the-shelf" conversion
 >  programs that can turn time integers into YYMMDDHHMMSS  type
 >  strings?

You should be able to write one yourself fairly quickly and
easily with the help of strftime() and localtime().  See the man
pages of these functions.

James Bailie <jimmy at jamesbailie.com>

More information about the freebsd-questions mailing list