| Red Hat Documentation: man pages: man3: Linux Programmer's Manual (3) |
STRPTIMESection: Linux Programmer's Manual (3)Updated: 26 September 2025 Index NAMEstrptime - convert a string representation of time to a time tm structureSYNOPSIS#include <time.h>char *strptime(char *buf, const char *format, const struct tm *tm); DESCRIPTIONstrptime() is the complementary function to strftime() and converts the character string pointed to by buf to a time value, which is stored in the tm structure pointed to by tm, using the format specified by format. format is a character string that consists of field descriptors and text characters, reminiscent of Each field descriptor consists of a % character followd by another character that specifies the replacement for the field descriptor. All other characters are copied from format into the result. The following field descriptors are supported:
Case is ignored when matching items such as month or weekday names. The broken-down time structure tm is defined in <time.h> as follows:
RETURN VALUEThe strptime() function returns a pointer to the character following the last character in the string pointed to by buf .SEE ALSOBUGSThe return values point to static data, whose contents are overwritten by each call. NOTESThis function is only available in libraries newer than version 4.6.5 The function supports only those locales specified in
IndexThis document was created by using the manual pages. Time: 11:58:06 GMT, March 24, 2025 |
|
© 2001 Red Hat, Inc. All rights reserved. About Red Hat : Legal statement : Privacy statement : Y2K statement : Contact Red Hat |