Print this page
Garrett's man page edits.
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3c/strptime.3c
+++ new/usr/src/man/man3c/strptime.3c
1 1 '\" te
2 2 .\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved.
3 3 .\" Portions Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
4 4 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
5 5 .\" http://www.opengroup.org/bookstore/.
6 6 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
7 7 .\" This notice shall appear on any product containing this material.
8 8 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
9 9 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
10 10 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
11 -.TH STRPTIME 3C "Aug 27, 2007"
11 +.TH STRPTIME 3C "Jun 27, 2014"
12 12 .SH NAME
13 13 strptime, strptime_l \- date and time conversion
14 14 .SH SYNOPSIS
15 15 .LP
16 16 .nf
17 17 #include <time.h>
18 18
19 19 \fBchar *\fR\fBstrptime\fR(\fBconst char *restrict\fR \fIbuf\fR,
20 20 \fBconst char *restrict\fR \fIformat\fR, \fBstruct tm *restrict\fR \fItm\fR);
21 +.fi
22 +.LP
23 +.nf
24 +#include <time.h>
25 +#include <xlocale.h>
21 26
22 27 \fBchar *\fR\fBstrptime_l\fR(\fBconst char *restrict\fR \fIbuf\fR,
23 28 \fBconst char *restrict\fR \fIformat\fR, \fBstruct tm *restrict\fR \fItm\fR,
24 29 \fBlocale_t\fR \fIloc\fR);
25 30 .fi
26 -
27 31 .SS "Non-zeroing Behavior"
28 32 .LP
29 33 .nf
30 34 \fBcc\fR [\fIflag\fR...] \fIfile\fR... \fB-D_STRPTIME_DONTZERO\fR [\fIlibrary\fR...]
31 35 #include <time.h>
32 36
33 37 \fBchar *\fR\fBstrptime\fR(\fBconst char *restrict\fR \fIbuf\fR,
34 38 \fBconst char *restrict\fR \fIformat\fR, \fBstruct tm *restrict\fR \fItm\fR);
35 39 .fi
36 40
37 41 .SH DESCRIPTION
38 -.sp
39 42 .LP
40 43 The \fBstrptime()\fR function converts the character string pointed to by
41 44 \fIbuf\fR to values which are stored in the \fBtm\fR structure pointed to by
42 45 \fItm\fR, using the format specified by \fIformat\fR. The \fBstrptime_l()\fR
43 46 function is identical to \fBstrptime()\fR except instead of acting in the
44 47 current locale, it acts in the locale specified by the argument \fIloc\fR.
45 -.sp
46 48 .LP
47 49 The \fIformat\fR argument is composed of zero or more conversion
48 50 specifications. Each conversion specification is composed of a "%" (percent)
49 51 character followed by one or two conversion characters which specify the
50 52 replacement required. One or more white space characters (as specified by
51 53 \fBisspace\fR(3C)) may precede or follow a conversion specification. There must
52 54 be white-space or other non-alphanumeric characters between any two conversion
53 55 specifications.
54 -.sp
55 56 .LP
56 57 A non-zeroing version of \fBstrptime()\fR, described below under \fBNon-zeroing
57 58 Behavior\fR, is provided if \fB_STRPTIME_DONTZERO\fR is defined.
58 59 .SS "Conversion Specifications"
59 -.sp
60 60 .LP
61 61 The following conversion specifications are supported:
62 62 .sp
63 63 .ne 2
64 64 .na
65 65 \fB\fB%%\fR\fR
66 66 .ad
67 67 .RS 6n
68 68 Same as \fB%\fR.
69 69 .RE
70 70
71 71 .sp
72 72 .ne 2
73 73 .na
74 74 \fB\fB%a\fR\fR
75 75 .ad
76 76 .RS 6n
77 77 Day of week, using the locale's weekday names; either the abbreviated or full
78 78 name may be specified.
79 79 .RE
80 80
81 81 .sp
82 82 .ne 2
83 83 .na
84 84 \fB\fB%A\fR\fR
85 85 .ad
86 86 .RS 6n
87 87 Same as \fB%a\fR.
88 88 .RE
89 89
90 90 .sp
91 91 .ne 2
92 92 .na
93 93 \fB\fB%b\fR\fR
94 94 .ad
95 95 .RS 6n
96 96 Month, using the locale's month names; either the abbreviated or full name may
97 97 be specified.
98 98 .RE
99 99
100 100 .sp
101 101 .ne 2
102 102 .na
103 103 \fB\fB%B\fR\fR
104 104 .ad
105 105 .RS 6n
106 106 Same as \fB%b\fR.
107 107 .RE
108 108
109 109 .sp
110 110 .ne 2
111 111 .na
112 112 \fB\fB%c\fR\fR
113 113 .ad
114 114 .RS 6n
115 115 Locale's appropriate date and time representation.
116 116 .RE
117 117
118 118 .sp
119 119 .ne 2
120 120 .na
121 121 \fB\fB%C\fR\fR
122 122 .ad
123 123 .RS 6n
124 124 Century number (the year divided by 100 and truncated to an integer as a
125 125 decimal number [1,99]); single digits are preceded by 0. If \fB%C\fR is used
126 126 without the \fB%y\fR specifier, \fBstrptime()\fR assumes the year offset is
127 127 zero in whichever century is specified. Note the behavior of \fB%C\fR in the
128 128 absence of \fB%y\fR is not specified by any of the standards or specifications
129 129 described on the \fBstandards\fR(5) manual page, so portable applications
130 130 should not depend on it. This behavior may change in a future release.
131 131 .RE
132 132
133 133 .sp
134 134 .ne 2
135 135 .na
136 136 \fB\fB%d\fR\fR
137 137 .ad
138 138 .RS 6n
139 139 Day of month [1,31]; leading zero is permitted but not required.
140 140 .RE
141 141
142 142 .sp
143 143 .ne 2
144 144 .na
145 145 \fB\fB%D\fR\fR
146 146 .ad
147 147 .RS 6n
148 148 Date as \fB%m\fR/\fB%d\fR/\fB%y\fR.
149 149 .RE
150 150
151 151 .sp
152 152 .ne 2
153 153 .na
154 154 \fB\fB%e\fR\fR
155 155 .ad
156 156 .RS 6n
157 157 Same as \fB%d\fR.
158 158 .RE
159 159
160 160 .sp
161 161 .ne 2
162 162 .na
163 163 \fB\fB%h\fR\fR
164 164 .ad
165 165 .RS 6n
166 166 Same as \fB%b\fR.
167 167 .RE
168 168
169 169 .sp
170 170 .ne 2
171 171 .na
172 172 \fB\fB%H\fR\fR
173 173 .ad
174 174 .RS 6n
175 175 Hour (24-hour clock) [0,23]; leading zero is permitted but not required.
176 176 .RE
177 177
178 178 .sp
179 179 .ne 2
180 180 .na
181 181 \fB\fB%I\fR\fR
182 182 .ad
183 183 .RS 6n
184 184 Hour (12-hour clock) [1,12]; leading zero is permitted but not required.
185 185 .RE
186 186
187 187 .sp
188 188 .ne 2
189 189 .na
190 190 \fB\fB%j\fR\fR
191 191 .ad
192 192 .RS 6n
193 193 Day number of the year [1,366]; leading zeros are permitted but not required.
194 194 .RE
195 195
196 196 .sp
197 197 .ne 2
198 198 .na
199 199 \fB\fB%m\fR\fR
200 200 .ad
201 201 .RS 6n
202 202 Month number [1,12]; leading zero is permitted but not required.
203 203 .RE
204 204
205 205 .sp
206 206 .ne 2
207 207 .na
208 208 \fB\fB%M\fR\fR
209 209 .ad
210 210 .RS 6n
211 211 Minute [0-59]; leading zero is permitted but not required.
212 212 .RE
213 213
214 214 .sp
215 215 .ne 2
216 216 .na
217 217 \fB\fB%n\fR\fR
218 218 .ad
219 219 .RS 6n
220 220 Any white space.
221 221 .RE
222 222
223 223 .sp
224 224 .ne 2
225 225 .na
226 226 \fB\fB%p\fR\fR
227 227 .ad
228 228 .RS 6n
229 229 Locale's equivalent of either a.m. or p.m.
230 230 .RE
231 231
232 232 .sp
233 233 .ne 2
234 234 .na
235 235 \fB\fB%r\fR\fR
236 236 .ad
237 237 .RS 6n
238 238 Appropriate time representation in the 12-hour clock format with \fB%p\fR.
239 239 .RE
240 240
241 241 .sp
242 242 .ne 2
243 243 .na
244 244 \fB\fB%R\fR\fR
245 245 .ad
246 246 .RS 6n
247 247 Time as \fB%H\fR:\fB%M\fR.
248 248 .RE
249 249
250 250 .SS "SUSv3"
251 251 .sp
252 252 .ne 2
253 253 .na
254 254 \fB\fB%S\fR\fR
255 255 .ad
256 256 .RS 6n
257 257 Seconds [0,60]; leading zero is permitted but not required. The range of values
258 258 is [00,60] rather than [00,59] to allow for the occasional leap second.
259 259 .RE
260 260
261 261 .SS "Default and other standards"
262 262 .sp
263 263 .ne 2
264 264 .na
265 265 \fB\fB%S\fR\fR
266 266 .ad
267 267 .RS 6n
268 268 Seconds [0,61]; leading zero is permitted but not required. The range of values
269 269 is [00,61] rather than [00,59] to allow for the occasional leap second and even
270 270 more occasional double leap second.
271 271 .RE
272 272
273 273 .sp
274 274 .ne 2
275 275 .na
276 276 \fB\fB%t\fR\fR
277 277 .ad
278 278 .RS 6n
279 279 Any white space.
280 280 .RE
281 281
282 282 .sp
283 283 .ne 2
284 284 .na
285 285 \fB\fB%T\fR\fR
286 286 .ad
287 287 .RS 6n
288 288 Time as \fB%H\fR:\fB%M\fR:\fB%S\fR.
289 289 .RE
290 290
291 291 .sp
292 292 .ne 2
293 293 .na
294 294 \fB\fB%U\fR\fR
295 295 .ad
296 296 .RS 6n
297 297 Week number of the year as a decimal number [0,53], with Sunday as the first
298 298 day of the week; leading zero is permitted but not required.
299 299 .RE
300 300
301 301 .sp
302 302 .ne 2
303 303 .na
304 304 \fB\fB%w\fR\fR
305 305 .ad
306 306 .RS 6n
307 307 Weekday as a decimal number [0,6], with 0 representing Sunday.
308 308 .RE
309 309
310 310 .sp
311 311 .ne 2
312 312 .na
313 313 \fB\fB%W\fR\fR
314 314 .ad
315 315 .RS 6n
316 316 Week number of the year as a decimal number [0,53], with Monday as the first
317 317 day of the week; leading zero is permitted but not required.
318 318 .RE
319 319
320 320 .sp
321 321 .ne 2
322 322 .na
323 323 \fB\fB%x\fR\fR
324 324 .ad
325 325 .RS 6n
326 326 Locale's appropriate date representation.
327 327 .RE
328 328
329 329 .sp
330 330 .ne 2
331 331 .na
332 332 \fB\fB%X\fR\fR
333 333 .ad
334 334 .RS 6n
335 335 Locale's appropriate time representation.
336 336 .RE
337 337
338 338 .sp
339 339 .ne 2
340 340 .na
341 341 \fB\fB%y\fR\fR
342 342 .ad
343 343 .RS 6n
344 344 Year within century. When a century is not otherwise specified, values in the
345 345 range 69-99 refer to years in the twentieth century (1969 to 1999 inclusive);
346 346 values in the range 00-68 refer to years in the twenty-first century (2000 to
347 347 2068 inclusive).
348 348 .RE
349 349
350 350 .sp
351 351 .ne 2
352 352 .na
353 353 \fB\fB%Y\fR\fR
354 354 .ad
355 355 .RS 6n
356 356 Year, including the century (for example, 1993).
357 357 .RE
358 358
↓ open down ↓ |
289 lines elided |
↑ open up ↑ |
359 359 .sp
360 360 .ne 2
361 361 .na
362 362 \fB\fB%Z\fR\fR
363 363 .ad
364 364 .RS 6n
365 365 Time zone name or no characters if no time zone exists.
366 366 .RE
367 367
368 368 .SS "Modified Conversion Specifications"
369 -.sp
370 369 .LP
371 370 Some conversion specifications can be modified by the \fBE\fR and \fBO\fR
372 371 modifier characters to indicate that an alternate format or specification
373 372 should be used rather than the one normally used by the unmodified
374 373 specification. If the alternate format or specification does not exist in the
375 374 current locale, the behavior will be as if the unmodified conversion
376 375 specification were used.
377 376 .sp
378 377 .ne 2
379 378 .na
380 379 \fB\fB%Ec\fR\fR
381 380 .ad
382 381 .RS 7n
383 382 Locale's alternate appropriate date and time representation.
384 383 .RE
385 384
386 385 .sp
387 386 .ne 2
388 387 .na
389 388 \fB\fB%EC\fR\fR
390 389 .ad
391 390 .RS 7n
392 391 Name of the base year (era) in the locale's alternate representation.
393 392 .RE
394 393
395 394 .sp
396 395 .ne 2
397 396 .na
398 397 \fB\fB%Ex\fR\fR
399 398 .ad
400 399 .RS 7n
401 400 Locale's alternate date representation.
402 401 .RE
403 402
404 403 .sp
405 404 .ne 2
406 405 .na
407 406 \fB\fB%EX\fR\fR
408 407 .ad
409 408 .RS 7n
410 409 Locale's alternate time representation.
411 410 .RE
412 411
413 412 .sp
414 413 .ne 2
415 414 .na
416 415 \fB\fB%Ey\fR\fR
417 416 .ad
418 417 .RS 7n
419 418 Offset from \fB%EC\fR (year only) in the locale's alternate representation.
420 419 .RE
421 420
422 421 .sp
423 422 .ne 2
424 423 .na
425 424 \fB\fB%EY\fR\fR
426 425 .ad
427 426 .RS 7n
428 427 Full alternate year representation.
429 428 .RE
430 429
431 430 .sp
432 431 .ne 2
433 432 .na
434 433 \fB\fB%Od\fR\fR
435 434 .ad
436 435 .RS 7n
437 436 Day of the month using the locale's alternate numeric symbols.
438 437 .RE
439 438
440 439 .sp
441 440 .ne 2
442 441 .na
443 442 \fB\fB%Oe\fR\fR
444 443 .ad
445 444 .RS 7n
446 445 Same as \fB%Od\fR.
447 446 .RE
448 447
449 448 .sp
450 449 .ne 2
451 450 .na
452 451 \fB\fB%OH\fR\fR
453 452 .ad
454 453 .RS 7n
455 454 Hour (24-hour clock) using the locale's alternate numeric symbols.
456 455 .RE
457 456
458 457 .sp
459 458 .ne 2
460 459 .na
461 460 \fB\fB%OI\fR\fR
462 461 .ad
463 462 .RS 7n
464 463 Hour (12-hour clock) using the locale's alternate numeric symbols.
465 464 .RE
466 465
467 466 .sp
468 467 .ne 2
469 468 .na
470 469 \fB\fB%Om\fR\fR
471 470 .ad
472 471 .RS 7n
473 472 Month using the locale's alternate numeric symbols.
474 473 .RE
475 474
476 475 .sp
477 476 .ne 2
478 477 .na
479 478 \fB\fB%OM\fR\fR
480 479 .ad
481 480 .RS 7n
482 481 Minutes using the locale's alternate numeric symbols.
483 482 .RE
484 483
485 484 .sp
486 485 .ne 2
487 486 .na
488 487 \fB\fB%OS\fR\fR
489 488 .ad
490 489 .RS 7n
491 490 Seconds using the locale's alternate numeric symbols.
492 491 .RE
493 492
494 493 .sp
495 494 .ne 2
496 495 .na
497 496 \fB\fB%OU\fR\fR
498 497 .ad
499 498 .RS 7n
500 499 Week number of the year (Sunday as the first day of the week) using the
501 500 locale's alternate numeric symbols.
502 501 .RE
503 502
504 503 .sp
505 504 .ne 2
506 505 .na
507 506 \fB\fB%Ow\fR\fR
508 507 .ad
509 508 .RS 7n
510 509 Number of the weekday (Sunday=0) using the locale's alternate numeric symbols.
511 510 .RE
512 511
513 512 .sp
514 513 .ne 2
515 514 .na
516 515 \fB\fB%OW\fR\fR
517 516 .ad
518 517 .RS 7n
519 518 Week number of the year (Monday as the first day of the week) using the
520 519 locale's alternate numeric symbols.
521 520 .RE
522 521
523 522 .sp
↓ open down ↓ |
144 lines elided |
↑ open up ↑ |
524 523 .ne 2
525 524 .na
526 525 \fB\fB%Oy\fR\fR
527 526 .ad
528 527 .RS 7n
529 528 Year (offset from \fB%C\fR) in the locale's alternate representation and using
530 529 the locale's alternate numeric symbols.
531 530 .RE
532 531
533 532 .SS "General Specifications"
534 -.sp
535 533 .LP
536 534 A conversion specification that is an ordinary character is executed by
537 535 scanning the next character from the buffer. If the character scanned from the
538 536 buffer differs from the one comprising the specification, the specification
539 537 fails, and the differing and subsequent characters remain unscanned.
540 538 .sp
541 539 .LP
542 540 A series of specifications composed of \fB%n\fR, \fB%t\fR, white-space
543 541 characters or any combination is executed by scanning up to the first character
544 542 that is not white space (which remains unscanned), or until no more characters
545 543 can be scanned. White space is defined by \fBisspace\fR(3C).
546 -.sp
547 544 .LP
548 545 Any other conversion specification is executed by scanning characters until a
549 546 character matching the next specification is scanned, or until no more
550 547 characters can be scanned. These characters, except the one matching the next
551 548 specification, are then compared to the locale values associated with the
552 549 conversion specifier. If a match is found, values for the appropriate
553 550 \fItm\fR structure members are set to values corresponding to the locale
554 551 information. If no match is found, \fBstrptime()\fR fails and no more
555 552 characters are scanned.
556 553 .sp
557 554 .LP
558 555 The month names, weekday names, era names, and alternate numeric symbols can
559 556 consist of any combination of upper and lower case letters. The user can
560 557 request that the input date or time specification be in a specific language by
561 558 setting the \fBLC_TIME\fR category using \fBsetlocale\fR(3C).
562 559 .SS "Non-zeroing Behavior"
563 -.sp
564 560 .LP
565 561 In addition to the behavior described above by various standards, the Solaris
566 562 implementation of \fBstrptime()\fR provides the following extensions. These may
567 563 change at any time in the future. Portable applications should not depend on
568 564 these extended features:
569 565 .RS +4
570 566 .TP
571 567 .ie t \(bu
572 568 .el o
573 569 If \fB_STRPTIME_DONTZERO\fR is not defined, the \fBtm struct\fR is zeroed on
574 570 entry and \fBstrptime()\fR updates the fields of the \fBtm struct\fR associated
575 571 with the specifiers in the format string.
↓ open down ↓ |
2 lines elided |
↑ open up ↑ |
576 572 .RE
577 573 .RS +4
578 574 .TP
579 575 .ie t \(bu
580 576 .el o
581 577 If \fB_STRPTIME_DONTZERO\fR is defined, \fBstrptime()\fR does not zero the
582 578 \fBtm struct\fR on entry. Additionally, for some specifiers, \fBstrptime()\fR
583 579 will use some values in the input \fBtm struct\fR to recalculate the date and
584 580 re-assign the appropriate members of the \fBtm struct\fR.
585 581 .RE
586 -.sp
587 582 .LP
588 583 The following describes extended features regardless of whether
589 584 \fB_STRPTIME_DONTZERO\fR is defined or not defined:
590 585 .RS +4
591 586 .TP
592 587 .ie t \(bu
593 588 .el o
594 589 If \fB%j\fR is specified, \fBtm_yday\fR is set; if year is given, and if month
595 590 and day are not given, \fBstrptime()\fR calculates and sets \fBtm_mon\fR,
596 591 \fBtm_mday\fR, and \fBtm_year\fR.
597 592 .RE
598 593 .RS +4
599 594 .TP
600 595 .ie t \(bu
601 596 .el o
602 597 If \fB%U\fR or \fB%W\fR is specified and if weekday and year are given and
603 598 month and day of month are not given, \fBstrptime()\fR calculates and sets
604 599 \fBtm_mon\fR, \fBtm_mday\fR, \fBtm_wday\fR, and \fBtm_year\fR.
605 600 .RE
606 -.sp
607 601 .LP
608 602 The following describes extended features when \fB_STRPTIME_DONTZERO\fR is not
609 603 defined:
610 604 .RS +4
611 605 .TP
612 606 .ie t \(bu
613 607 .el o
614 608 If \fB%C\fR is specified and \fB%y\fR is not specified, \fBstrptime()\fRassumes
615 609 0 as the year offset, then calculates the year, and assigns \fBtm_year\fR.
616 610 .RE
617 -.sp
618 611 .LP
619 612 The following describes extended features when \fB_STRPTIME_DONTZERO\fR is
620 613 defined:
621 614 .RS +4
622 615 .TP
623 616 .ie t \(bu
624 617 .el o
625 618 If \fB%C\fR is specified and \fB%y\fR is not specified, \fBstrptime()\fR
626 619 assumes the year offset of the year value of the \fBtm_year\fR member of the
627 620 input \fBtm struct\fR, then calculates the year and assigns \fBtm_year\fR.
628 621 .RE
629 622 .RS +4
630 623 .TP
631 624 .ie t \(bu
632 625 .el o
633 626 If \fB%j\fR is specified and neither \fB%y\fR, \fB%Y\fR, nor \fB%C\fR are
634 627 specified, and neither month nor day of month are specified, \fBstrptime()\fR
635 628 assumes the year value given by the value of the \fBtm_year\fR field of the
636 629 input \fBtm struct\fR. Then, in addition to setting \fBtm_yday\fR,
637 630 \fBstrptime()\fR uses day-of-year and year values to calculate the month and
638 631 day-of-month, and assigns \fBtm_month\fR and \fBtm_mday\fR.
639 632 .RE
640 633 .RS +4
641 634 .TP
642 635 .ie t \(bu
643 636 .el o
644 637 If \fB%U\fR or \fB%W\fR is specified, and if weekday and/or year are not given,
645 638 and month and day of month are not given, \fBstrptime()\fR will assume the
646 639 weekday value and/or the year value as the value of the \fBtm_wday\fR field
647 640 and/or \fBtm_year\fR field of the input \fBtm struct\fR. Then,
648 641 \fBstrptime()\fR will calculate the month and day-of-month and assign
649 642 \fBtm_month\fR, \fBtm_mday\fR, and/or \fBtm_year\fR.
650 643 .RE
651 644 .RS +4
652 645 .TP
↓ open down ↓ |
25 lines elided |
↑ open up ↑ |
653 646 .ie t \(bu
654 647 .el o
655 648 If \fB%p\fR is specified and if hour is not specified, \fBstrptime()\fR will
656 649 reference, and if needed, update the \fBtm_hour\fR member. If the \fBam_pm\fR
657 650 input is p.m. and the input \fBtm_hour\fR value is between 0 - 11,
658 651 \fBstrptime()\fR will add 12 hours and update \fBtm_hour\fR. If the
659 652 \fBam_pm\fR input is a.m. and input \fBtm_hour\fR value is between 12 - 23,
660 653 \fBstrptime()\fR will subtract 12 hours and update \fBtm_hour\fR.
661 654 .RE
662 655 .SH RETURN VALUES
663 -.sp
664 656 .LP
665 657 Upon successful completion, \fBstrptime()\fR returns a pointer to the character
666 658 following the last character parsed. Otherwise, a null pointer is returned.
667 659 .SH USAGE
668 -.sp
669 660 .LP
670 661 Several "same as" formats, and the special processing of white-space characters
671 662 are provided in order to ease the use of identical \fIformat\fR strings for
672 663 \fBstrftime\fR(3C) and \fBstrptime()\fR.
673 -.sp
674 664 .LP
675 665 The \fBstrptime()\fR function tries to calculate \fBtm_year\fR, \fBtm_mon\fR,
676 666 and \fBtm_mday\fR when given incomplete input. This allows the \fBstruct tm\fR
677 667 created by \fBstrptime()\fR to be passed to \fBmktime\fR(3C) to produce a
678 668 \fBtime_t\fR value for dates and times that are representable by a
679 669 \fBtime_t\fR. As an example, since \fBmktime()\fR ignores \fBtm_yday\fR,
680 670 \fBstrptime()\fR calculates \fBtm_mon\fR and \fBtm_mday\fR as well as filling
681 671 in \fBtm_yday\fR when \fB%j\fR is specified without otherwise specifying a
682 672 month and day within month.
683 673 .SH ATTRIBUTES
684 -.sp
685 674 .LP
686 675 See \fBattributes\fR(5) for descriptions of the following attributes:
687 -.sp
688 -
689 -.sp
690 676 .TS
691 677 box;
692 678 c | c
693 679 l | l .
694 680 ATTRIBUTE TYPE ATTRIBUTE VALUE
695 681 _
696 682 CSI Enabled
697 683 _
698 -Interface Stability Committed
684 +Interface Stability See below.
699 685 _
700 686 MT-Level MT-Safe
701 687 _
702 -Standard See \fBstandards\fR(5).
688 +Standard See \fBstandards\fR(5) for \fBstrptime()\fR.
703 689 .TE
704 690
691 +.LP
692 +The \fBstrptime()\fR function is Standard. The \fBstrptime_l()\fR function
693 +is Uncommitted.
705 694 .SH SEE ALSO
706 -.sp
707 695 .LP
708 696 \fBctime\fR(3C), \fBgetdate\fR(3C), \fBisspace\fR(3C), \fBmktime\fR(3C),
709 -\fBsetlocale\fR(3C), \fBstrftime\fR(3C), \fBattributes\fR(5), \fBenviron\fR(5),
697 +\fBnewlocale\fR(3C),
698 +\fBsetlocale\fR(3C), \fBstrftime\fR(3C), \fBuselocale\fR(3C),
699 +\fBattributes\fR(5), \fBenviron\fR(5),
710 700 \fBstandards\fR(5)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX