Print this page
11586 NAME field in man pages should match what's installed

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man3c/strftime.3c
          +++ new/usr/src/man/man3c/strftime.3c
↓ open down ↓ 38 lines elided ↑ open up ↑
  39   39  .\" fields enclosed by brackets "[]" replaced with your own identifying
  40   40  .\" information: Portions Copyright [yyyy] [name of copyright owner]
  41   41  .\"
  42   42  .\"
  43   43  .\" Copyright 1989 AT&T
  44   44  .\" Portions Copyright (c) 1992, X/Open Company Limited.  All Rights Reserved.
  45   45  .\" Copyright (c) 2008, Sun Microsystems, Inc.  All Rights Reserved.
  46   46  .\" Copyright (c) 2014 Gary Mills
  47   47  .\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
  48   48  .\"
  49      -.TH STRFTIME 3C "Mar 30, 2019"
       49 +.TH STRFTIME 3C "Aug 20, 2019"
  50   50  .SH NAME
  51      -strftime, strftime_l cftime, ascftime \- convert date and time to string
       51 +strftime, strftime_l, cftime, ascftime \- convert date and time to string
  52   52  .SH SYNOPSIS
  53      -.LP
  54   53  .nf
  55   54  #include <time.h>
  56   55  
  57   56  \fBsize_t\fR \fBstrftime\fR(\fBchar *restrict\fR \fIs\fR, \fBsize_t\fR \fImaxsize\fR,
  58   57       \fBconst char *restrict\fR \fIformat\fR,
  59   58       \fBconst struct tm *restrict\fR \fItimeptr\fR);
  60   59  .fi
  61   60  .LP
  62   61  .nf
  63   62  \fBsize_t\fR \fBstrftime_l\fR(\fBchar *restrict\fR \fIs\fR, \fBsize_t\fR \fImaxsize\fR,
↓ open down ↓ 4 lines elided ↑ open up ↑
  68   67  .nf
  69   68  \fBint\fR \fBcftime\fR(\fBchar *\fR\fIs\fR, \fBchar *\fR\fIformat\fR, \fBconst time_t *\fR\fIclock\fR);
  70   69  .fi
  71   70  .LP
  72   71  .nf
  73   72  \fBint\fR \fBascftime\fR(\fBchar *\fR\fIs\fR, \fBconst char *\fR\fIformat\fR,
  74   73       \fBconst struct tm *\fR\fItimeptr\fR);
  75   74  .fi
  76   75  
  77   76  .SH DESCRIPTION
  78      -.LP
  79   77  The \fBstrftime()\fR, \fBstrftime_l()\fR, \fBascftime()\fR, and \fBcftime()\fR
  80   78  functions place
  81   79  bytes into the array pointed to by \fIs\fR as controlled by the string pointed
  82   80  to by \fIformat\fR. The \fIformat\fR string consists of zero or more conversion
  83   81  specifications and ordinary characters.  A conversion specification consists of
  84   82  a '\fB%\fR' (percent) character and one or two terminating conversion
  85   83  characters that determine the conversion specification's behavior.  All
  86   84  ordinary characters (including the terminating null byte) are copied unchanged
  87   85  into the array pointed to by \fIs\fR. If copying takes place between objects
  88   86  that overlap, the behavior is undefined. For \fBstrftime()\fR, no more than
↓ open down ↓ 10 lines elided ↑ open up ↑
  99   97  .LP
 100   98  Each conversion specification is replaced by appropriate characters as
 101   99  described in the following list. The appropriate characters are determined by
 102  100  the \fBLC_TIME\fR category of the program's locale and by the values contained
 103  101  in the structure pointed to by \fItimeptr\fR for \fBstrftime()\fR and
 104  102  \fBascftime()\fR, and by the time represented by \fIclock\fR for
 105  103  \fBcftime()\fR.
 106  104  .sp
 107  105  .ne 2
 108  106  .na
 109      -\fB\fB%%\fR\fR
      107 +\fB%%\fR
 110  108  .ad
 111  109  .RS 6n
 112  110  Same as \fB%\fR.
 113  111  .RE
 114  112  
 115  113  .sp
 116  114  .ne 2
 117  115  .na
 118      -\fB\fB%a\fR\fR
      116 +\fB%a\fR
 119  117  .ad
 120  118  .RS 6n
 121  119  Locale's abbreviated weekday name.
 122  120  .RE
 123  121  
 124  122  .sp
 125  123  .ne 2
 126  124  .na
 127      -\fB\fB%A\fR\fR
      125 +\fB%A\fR
 128  126  .ad
 129  127  .RS 6n
 130  128  Locale's full weekday name.
 131  129  .RE
 132  130  
 133  131  .sp
 134  132  .ne 2
 135  133  .na
 136      -\fB\fB%b\fR\fR
      134 +\fB%b\fR
 137  135  .ad
 138  136  .RS 6n
 139  137  Locale's abbreviated month name.
 140  138  .RE
 141  139  
 142  140  .sp
 143  141  .ne 2
 144  142  .na
 145      -\fB\fB%B\fR\fR
      143 +\fB%B\fR
 146  144  .ad
 147  145  .RS 6n
 148  146  Locale's full month name.
 149  147  .RE
 150  148  
 151  149  .sp
 152  150  .ne 2
 153  151  .na
 154      -\fB\fB%c\fR\fR
      152 +\fB%c\fR
 155  153  .ad
 156  154  .RS 6n
 157  155  Locale's appropriate date and time representation.
 158  156  In the C locale, this format is:
 159  157  .sp
 160  158  .in +2
 161  159  .nf
 162  160  %a %b %e %H:%M:%S %Y
 163  161  .fi
 164  162  .in -2
 165  163  .sp
 166  164  Other locales may have different locale-specific formats.
 167  165  .RE
 168  166  
 169  167  .sp
 170  168  .ne 2
 171  169  .na
 172      -\fB\fB%C\fR\fR
      170 +\fB%C\fR
 173  171  .ad
 174  172  .RS 6n
 175  173  Century number (the year divided by 100 and truncated to an integer as a
 176  174  decimal number [01,99]).
 177  175  .RE
 178  176  
 179  177  .sp
 180  178  .ne 2
 181  179  .na
 182      -\fB\fB%d\fR\fR
      180 +\fB%d\fR
 183  181  .ad
 184  182  .RS 6n
 185  183  Day of month [01,31].
 186  184  .RE
 187  185  
 188  186  .sp
 189  187  .ne 2
 190  188  .na
 191      -\fB\fB%D\fR\fR
      189 +\fB%D\fR
 192  190  .ad
 193  191  .RS 6n
 194  192  Date as \fB%m\fR/\fB%d\fR/\fB%y\fR.
 195  193  .RE
 196  194  
 197  195  .sp
 198  196  .ne 2
 199  197  .na
 200      -\fB\fB%e\fR\fR
      198 +\fB%e\fR
 201  199  .ad
 202  200  .RS 6n
 203  201  Day of month [1,31]; single  digits are preceded by a space.
 204  202  .RE
 205  203  
 206  204  .sp
 207  205  .ne 2
 208  206  .na
 209      -\fB\fB%F\fR\fR
      207 +\fB%F\fR
 210  208  .ad
 211  209  .RS 6n
 212  210  Equivalent to \fB%Y\fR-\fB%m\fR-\fB%d\fR (the ISO 8601:2000 standard date
 213  211  format).
 214  212  .RE
 215  213  
 216  214  .sp
 217  215  .ne 2
 218  216  .na
 219      -\fB\fB%g\fR\fR
      217 +\fB%g\fR
 220  218  .ad
 221  219  .RS 6n
 222  220  Week-based year within century [00,99].
 223  221  .RE
 224  222  
 225  223  .sp
 226  224  .ne 2
 227  225  .na
 228      -\fB\fB%G\fR\fR
      226 +\fB%G\fR
 229  227  .ad
 230  228  .RS 6n
 231  229  Week-based year, including the century [0000,9999].
 232  230  .RE
 233  231  
 234  232  .sp
 235  233  .ne 2
 236  234  .na
 237      -\fB\fB%h\fR\fR
      235 +\fB%h\fR
 238  236  .ad
 239  237  .RS 6n
 240  238  Locale's abbreviated month name.
 241  239  .RE
 242  240  
 243  241  .sp
 244  242  .ne 2
 245  243  .na
 246      -\fB\fB%H\fR\fR
      244 +\fB%H\fR
 247  245  .ad
 248  246  .RS 6n
 249  247  Hour (24-hour clock) [00,23].
 250  248  .RE
 251  249  
 252  250  .sp
 253  251  .ne 2
 254  252  .na
 255      -\fB\fB%I\fR\fR
      253 +\fB%I\fR
 256  254  .ad
 257  255  .RS 6n
 258  256  Hour (12-hour clock) [01,12].
 259  257  .RE
 260  258  
 261  259  .sp
 262  260  .ne 2
 263  261  .na
 264      -\fB\fB%j\fR\fR
      262 +\fB%j\fR
 265  263  .ad
 266  264  .RS 6n
 267  265  Day number of year [001,366].
 268  266  .RE
 269  267  
 270  268  .sp
 271  269  .ne 2
 272  270  .na
 273      -\fB\fB%k\fR\fR
      271 +\fB%k\fR
 274  272  .ad
 275  273  .RS 6n
 276  274  Hour (24-hour clock) [0,23]; single digits are preceded by a space.
 277  275  .RE
 278  276  
 279  277  .sp
 280  278  .ne 2
 281  279  .na
 282      -\fB\fB%l\fR\fR
      280 +\fB%l\fR
 283  281  .ad
 284  282  .RS 6n
 285  283  Hour (12-hour clock) [1,12]; single digits are preceded by a space.
 286  284  .RE
 287  285  
 288  286  .sp
 289  287  .ne 2
 290  288  .na
 291      -\fB\fB%m\fR\fR
      289 +\fB%m\fR
 292  290  .ad
 293  291  .RS 6n
 294  292  Month number [01,12].
 295  293  .RE
 296  294  
 297  295  .sp
 298  296  .ne 2
 299  297  .na
 300      -\fB\fB%M\fR\fR
      298 +\fB%M\fR
 301  299  .ad
 302  300  .RS 6n
 303  301  Minute [00,59].
 304  302  .RE
 305  303  
 306  304  .sp
 307  305  .ne 2
 308  306  .na
 309      -\fB\fB%n\fR\fR
      307 +\fB%n\fR
 310  308  .ad
 311  309  .RS 6n
 312  310  Insert a NEWLINE.
 313  311  .RE
 314  312  
 315  313  .sp
 316  314  .ne 2
 317  315  .na
 318      -\fB\fB%p\fR\fR
      316 +\fB%p\fR
 319  317  .ad
 320  318  .RS 6n
 321  319  Locale's equivalent of either a.m. or p.m.
 322  320  .RE
 323  321  
 324  322  .sp
 325  323  .ne 2
 326  324  .na
 327      -\fB\fB%r\fR\fR
      325 +\fB%r\fR
 328  326  .ad
 329  327  .RS 6n
 330  328  Appropriate time representation in 12-hour clock format with \fB%p\fR.
 331  329  .RE
 332  330  
 333  331  .sp
 334  332  .ne 2
 335  333  .na
 336      -\fB\fB%R\fR\fR
      334 +\fB%R\fR
 337  335  .ad
 338  336  .RS 6n
 339  337  Time as \fB%H\fR:\fB%M\fR.
 340  338  .RE
 341  339  
 342  340  .sp
 343  341  .ne 2
 344  342  .na
 345      -\fB\fB%s\fR\fR
      343 +\fB%s\fR
 346  344  .ad
 347  345  .RS 6n
 348  346  Seconds since 00:00:00 UTC, January 1, 1970.
 349  347  .RE
 350  348  
 351  349  .sp
 352  350  .ne 2
 353  351  .na
 354      -\fB\fB%S\fR\fR
      352 +\fB%S\fR
 355  353  .ad
 356  354  .RS 6n
 357  355  Seconds [00,60]; the range of values is [00,60] rather than [00,59] to allow
 358  356  for the occasional leap second.
 359  357  .RE
 360  358  
 361  359  .sp
 362  360  .ne 2
 363  361  .na
 364      -\fB\fB%t\fR\fR
      362 +\fB%t\fR
 365  363  .ad
 366  364  .RS 6n
 367  365  Insert a TAB.
 368  366  .RE
 369  367  
 370  368  .sp
 371  369  .ne 2
 372  370  .na
 373      -\fB\fB%T\fR\fR
      371 +\fB%T\fR
 374  372  .ad
 375  373  .RS 6n
 376  374  Time as \fB%H\fR:\fB%M\fR:\fB%S\fR.
 377  375  .RE
 378  376  
 379  377  .sp
 380  378  .ne 2
 381  379  .na
 382      -\fB\fB%u\fR\fR
      380 +\fB%u\fR
 383  381  .ad
 384  382  .RS 6n
 385  383  Weekday as a decimal number [1,7], with 1 representing Monday. See \fBNOTES\fR
 386  384  below.
 387  385  .RE
 388  386  
 389  387  .sp
 390  388  .ne 2
 391  389  .na
 392      -\fB\fB%U\fR\fR
      390 +\fB%U\fR
 393  391  .ad
 394  392  .RS 6n
 395  393  Week number of year as a decimal number [00,53], with Sunday as the first day
 396  394  of week 1.
 397  395  .RE
 398  396  
 399  397  .sp
 400  398  .ne 2
 401  399  .na
 402      -\fB\fB%v\fR\fR
      400 +\fB%v\fR
 403  401  .ad
 404  402  .RS 6n
 405  403  Date as \fB%e\fR-\fB%b\fR-\fB%Y\fR.
 406  404  .RE
 407  405  
 408  406  .sp
 409  407  .ne 2
 410  408  .na
 411      -\fB\fB%V\fR\fR
      409 +\fB%V\fR
 412  410  .ad
 413  411  .RS 6n
 414  412  The ISO 8601 week number as a decimal number [01,53]. In the ISO 8601
 415  413  week-based system, weeks begin on a Monday and week 1 of the year is the week
 416  414  that includes both January 4th and the first Thursday of the year.  If the
 417  415  first Monday of January is the 2nd, 3rd, or 4th, the preceding days are part of
 418  416  the last week of the preceding year.  See \fBNOTES\fR below.
 419  417  .RE
 420  418  
 421  419  .sp
 422  420  .ne 2
 423  421  .na
 424      -\fB\fB%w\fR\fR
      422 +\fB%w\fR
 425  423  .ad
 426  424  .RS 6n
 427  425  Weekday as a decimal number [0,6], with 0 representing Sunday.
 428  426  .RE
 429  427  
 430  428  .sp
 431  429  .ne 2
 432  430  .na
 433      -\fB\fB%W\fR\fR
      431 +\fB%W\fR
 434  432  .ad
 435  433  .RS 6n
 436  434  Week number of year as a decimal number [00,53], with Monday as the first day
 437  435  of week 1.
 438  436  .RE
 439  437  
 440  438  .sp
 441  439  .ne 2
 442  440  .na
 443      -\fB\fB%x\fR\fR
      441 +\fB%x\fR
 444  442  .ad
 445  443  .RS 6n
 446  444  Locale's appropriate date representation.
 447  445  .RE
 448  446  
 449  447  .sp
 450  448  .ne 2
 451  449  .na
 452      -\fB\fB%X\fR\fR
      450 +\fB%X\fR
 453  451  .ad
 454  452  .RS 6n
 455  453  Locale's appropriate time representation.
 456  454  .RE
 457  455  
 458  456  .sp
 459  457  .ne 2
 460  458  .na
 461      -\fB\fB%y\fR\fR
      459 +\fB%y\fR
 462  460  .ad
 463  461  .RS 6n
 464  462  Year within century [00,99].
 465  463  .RE
 466  464  
 467  465  .sp
 468  466  .ne 2
 469  467  .na
 470      -\fB\fB%Y\fR\fR
      468 +\fB%Y\fR
 471  469  .ad
 472  470  .RS 6n
 473  471  Year, including the century (for example 1993).
 474  472  .RE
 475  473  
 476  474  .sp
 477  475  .ne 2
 478  476  .na
 479      -\fB\fB%z\fR\fR
      477 +\fB%z\fR
 480  478  .ad
 481  479  .RS 6n
 482  480  Replaced by offset from UTC in ISO 8601:2000 standard format (\fB+hhmm\fR or
 483  481  \fB-hhmm\fR), or by no characters if no time zone is determinable. For example,
 484  482  "-0430" means 4 hours 30 minutes behind UTC (west of Greenwich). If
 485  483  \fBtm_isdst\fR is zero, the standard time offset is used.  If \fBtm_isdst\fR is
 486  484  greater than zero, the daylight savings time offset if used. If \fBtm_isdst\fR
 487  485  is negative, no characters are returned.
 488  486  .RE
 489  487  
 490  488  .sp
 491  489  .ne 2
 492  490  .na
 493      -\fB\fB%Z\fR\fR
      491 +\fB%Z\fR
 494  492  .ad
 495  493  .RS 6n
 496  494  Time zone name or abbreviation, or no bytes if no time zone information exists.
 497  495  .RE
 498  496  
 499  497  .sp
 500  498  .ne 2
 501  499  .na
 502      -\fB\fB%+\fR\fR
      500 +\fB%+\fR
 503  501  .ad
 504  502  .RS 6n
 505  503  Locale's date and time representation as produced by \fBdate\fR(1).
 506  504  .RE
 507  505  
 508  506  .LP
 509  507  If a conversion specification does not correspond to any of the above or to any
 510  508  of the modified conversion specifications listed below, the behavior is
 511  509  undefined and \fB0\fR is returned.
 512  510  .LP
 513  511  The difference between \fB%U\fR and \fB%W\fR (and also between modified
 514  512  conversion specifications \fB%OU\fR and \fB%OW\fR) lies in which day is counted
 515  513  as the first of the week. Week number 1 is the first week in January starting
 516  514  with a Sunday for \fB%U\fR or a Monday for \fB%W\fR. Week number 0 contains
 517  515  those days before the first Sunday or Monday in January for \fB%U\fR and
 518  516  \fB%W\fR, respectively.
 519  517  .SS "Modified Conversion Specifications"
 520      -.LP
 521  518  Some conversion specifications can be modified by the \fBE\fR and \fBO\fR
 522  519  modifiers to indicate that an alternate format or specification should be used
 523  520  rather than the one normally used by the unmodified conversion specification.
 524  521  If the alternate format or specification does not exist in the current locale,
 525  522  the behavior will be as if the unmodified specification were used.
 526  523  .sp
 527  524  .ne 2
 528  525  .na
 529      -\fB\fB%Ec\fR\fR
      526 +\fB%Ec\fR
 530  527  .ad
 531  528  .RS 7n
 532  529  Locale's alternate appropriate date and time representation.
 533  530  .RE
 534  531  
 535  532  .sp
 536  533  .ne 2
 537  534  .na
 538      -\fB\fB%EC\fR\fR
      535 +\fB%EC\fR
 539  536  .ad
 540  537  .RS 7n
 541  538  Name of the base year (period) in the locale's alternate representation.
 542  539  .RE
 543  540  
 544  541  .sp
 545  542  .ne 2
 546  543  .na
 547      -\fB\fB%Eg\fR\fR
      544 +\fB%Eg\fR
 548  545  .ad
 549  546  .RS 7n
 550  547  Offset from \fB%EC\fR of the week-based year in the locale's alternative
 551  548  representation.
 552  549  .RE
 553  550  
 554  551  .sp
 555  552  .ne 2
 556  553  .na
 557      -\fB\fB%EG\fR\fR
      554 +\fB%EG\fR
 558  555  .ad
 559  556  .RS 7n
 560  557  Full alternative representation of the week-based year.
 561  558  .RE
 562  559  
 563  560  .sp
 564  561  .ne 2
 565  562  .na
 566      -\fB\fB%Ex\fR\fR
      563 +\fB%Ex\fR
 567  564  .ad
 568  565  .RS 7n
 569  566  Locale's alternate date representation.
 570  567  .RE
 571  568  
 572  569  .sp
 573  570  .ne 2
 574  571  .na
 575      -\fB\fB%EX\fR\fR
      572 +\fB%EX\fR
 576  573  .ad
 577  574  .RS 7n
 578  575  Locale's alternate time representation.
 579  576  .RE
 580  577  
 581  578  .sp
 582  579  .ne 2
 583  580  .na
 584      -\fB\fB%Ey\fR\fR
      581 +\fB%Ey\fR
 585  582  .ad
 586  583  .RS 7n
 587  584  Offset from \fB%EC\fR (year only) in the locale's alternate representation.
 588  585  .RE
 589  586  
 590  587  .sp
 591  588  .ne 2
 592  589  .na
 593      -\fB\fB%EY\fR\fR
      590 +\fB%EY\fR
 594  591  .ad
 595  592  .RS 7n
 596  593  Full alternate year representation.
 597  594  .RE
 598  595  
 599  596  .sp
 600  597  .ne 2
 601  598  .na
 602      -\fB\fB%Od\fR\fR
      599 +\fB%Od\fR
 603  600  .ad
 604  601  .RS 7n
 605  602  Day of the month using the locale's alternate numeric symbols.
 606  603  .RE
 607  604  
 608  605  .sp
 609  606  .ne 2
 610  607  .na
 611      -\fB\fB%Oe\fR\fR
      608 +\fB%Oe\fR
 612  609  .ad
 613  610  .RS 7n
 614  611  Same as \fB%Od\fR.
 615  612  .RE
 616  613  
 617  614  .sp
 618  615  .ne 2
 619  616  .na
 620      -\fB\fB%Og\fR\fR
      617 +\fB%Og\fR
 621  618  .ad
 622  619  .RS 7n
 623  620  Week-based year (offset from \fB%C\fR) in the locale's alternate representation
 624  621  and using the locale's alternate numeric symbols.
 625  622  .RE
 626  623  
 627  624  .sp
 628  625  .ne 2
 629  626  .na
 630      -\fB\fB%OH\fR\fR
      627 +\fB%OH\fR
 631  628  .ad
 632  629  .RS 7n
 633  630  Hour (24-hour clock) using the locale's alternate numeric symbols.
 634  631  .RE
 635  632  
 636  633  .sp
 637  634  .ne 2
 638  635  .na
 639      -\fB\fB%OI\fR\fR
      636 +\fB%OI\fR
 640  637  .ad
 641  638  .RS 7n
 642  639  Hour (12-hour clock) using the locale's alternate numeric symbols.
 643  640  .RE
 644  641  
 645  642  .sp
 646  643  .ne 2
 647  644  .na
 648      -\fB\fB%Om\fR\fR
      645 +\fB%Om\fR
 649  646  .ad
 650  647  .RS 7n
 651  648  Month using the locale's alternate numeric symbols.
 652  649  .RE
 653  650  
 654  651  .sp
 655  652  .ne 2
 656  653  .na
 657      -\fB\fB%OM\fR\fR
      654 +\fB%OM\fR
 658  655  .ad
 659  656  .RS 7n
 660  657  Minutes using the locale's alternate numeric symbols.
 661  658  .RE
 662  659  
 663  660  .sp
 664  661  .ne 2
 665  662  .na
 666      -\fB\fB%OS\fR\fR
      663 +\fB%OS\fR
 667  664  .ad
 668  665  .RS 7n
 669  666  Seconds using the locale's alternate numeric symbols.
 670  667  .RE
 671  668  
 672  669  .sp
 673  670  .ne 2
 674  671  .na
 675      -\fB\fB%Ou\fR\fR
      672 +\fB%Ou\fR
 676  673  .ad
 677  674  .RS 7n
 678  675  Weekday as a number in the locale's alternate numeric symbols.
 679  676  .RE
 680  677  
 681  678  .sp
 682  679  .ne 2
 683  680  .na
 684      -\fB\fB%OU\fR\fR
      681 +\fB%OU\fR
 685  682  .ad
 686  683  .RS 7n
 687  684  Week number of the year (Sunday as the first day of the week) using the
 688  685  locale's alternate numeric symbols.
 689  686  .RE
 690  687  
 691  688  .sp
 692  689  .ne 2
 693  690  .na
 694      -\fB\fB%Ow\fR\fR
      691 +\fB%Ow\fR
 695  692  .ad
 696  693  .RS 7n
 697  694  Number of the weekday (Sunday=0) using the  locale's alternate numeric symbols.
 698  695  .RE
 699  696  
 700  697  .sp
 701  698  .ne 2
 702  699  .na
 703      -\fB\fB%OW\fR\fR
      700 +\fB%OW\fR
 704  701  .ad
 705  702  .RS 7n
 706  703  Week number of the year (Monday as the first day of the week) using the
 707  704  locale's alternate numeric symbols.
 708  705  .RE
 709  706  
 710  707  .sp
 711  708  .ne 2
 712  709  .na
 713      -\fB\fB%Oy\fR\fR
      710 +\fB%Oy\fR
 714  711  .ad
 715  712  .RS 7n
 716  713  Year (offset from \fB%C\fR) in the locale's alternate representation and using
 717  714  the locale's alternate numeric symbols.
 718  715  .RE
 719  716  
 720  717  .SS "Selecting the Output Language"
 721      -.LP
 722  718  These routines produce output that is formatted according to the \fBLC_TIME\fR
 723  719  locale category.  They use either the current locale, or in the case of
 724  720  \fBstrftime_l()\fR, the locale supplied by \fIloc\fR.
 725  721  .SS "Time Zone"
 726      -.LP
 727  722  Local time zone information is used as though \fBtzset\fR(3C) were called.
 728  723  .SH RETURN VALUES
 729      -.LP
 730  724  These functions return the
 731  725  number of characters placed into the array pointed to by \fIs\fR, not including
 732  726  the terminating null character. If the total number of resulting characters
 733  727  including the terminating null character is more than \fImaxsize\fR,
 734  728  \fBstrftime()\fR returns \fB0\fR and the contents of the array are
 735  729  indeterminate.
 736  730  .SH EXAMPLES
 737      -.LP
 738  731  \fBExample 1 \fRAn example of the \fBstrftime()\fR function.
 739  732  .LP
 740  733  The following example illustrates the use of \fBstrftime()\fR for the
 741  734  \fBPOSIX\fR locale. It shows what the string in \fIstr\fR would look like if
 742  735  the structure pointed to by \fItmptr\fR contains the values corresponding to
 743  736  Thursday, August 28, 1986 at 12:44:36.
 744  737  .nf
 745  738  .IP
 746  739  \fBstrftime\fR(\fIstr\fR, \fIstrsize\fR, "%A %b %d %j", \fItmptr\fR);
 747  740  .fi
 748  741  .LP
 749  742  This results in \fIstr\fR containing "Thursday Aug 28 240".
 750  743  .SH ATTRIBUTES
 751      -.LP
 752  744  See \fBattributes\fR(5) for descriptions of the following attributes:
 753  745  .TS
 754  746  box;
 755  747  c | c
 756  748  l | l .
 757  749  ATTRIBUTE TYPE  ATTRIBUTE VALUE
 758  750  _
 759  751  CSI     Enabled
 760  752  _
 761  753  Interface Stability     See below.
↓ open down ↓ 2 lines elided ↑ open up ↑
 764  756  _
 765  757  Standard        See below.
 766  758  .TE
 767  759  
 768  760  .LP
 769  761  The \fBstrftime()\fR and \fBstrftime_l()\fR functions are Standard.
 770  762  \fBcftime()\fR and \fBascftime()\fR functions are Committed.
 771  763  .LP
 772  764  For \fBstrftime()\fR and \fBstrftime_l()\fR, see \fBstandards\fR(5).
 773  765  .SH SEE ALSO
 774      -.LP
 775  766  \fBdate\fR(1), \fBctime\fR(3C), \fBmktime\fR(3C),
 776  767  \fBnewlocale\fR(3C), \fBsetlocale\fR(3C), \fBstrptime\fR(3C), \fBtzset\fR(3C),
 777  768  \fBuselocale\fR(3C), \fBTIMEZONE\fR(4), \fBzoneinfo\fR(4),
 778  769  \fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)
 779  770  .SH NOTES
 780      -.LP
 781  771  The conversion specification for \fB%V\fR was changed in the Solaris 7 release.
 782  772  This change was based on the public review draft of the ISO C9x standard at
 783  773  that time. Previously, the specification stated that if the week containing 1
 784  774  January had fewer than four days in the new year, it became week 53 of the
 785  775  previous year. The ISO C9x standard committee subsequently recognized that that
 786  776  specification had been incorrect.
 787  777  .LP
 788  778  The conversion specifications for \fB%g\fR, \fB%G\fR, \fB%Eg\fR, \fB%EG\fR, and
 789  779  \fB%Og\fR were added in the Solaris 7 release.  This change was based on the
 790  780  public review draft of the ISO C9x standard at that time. The \fB%g\fR and
↓ open down ↓ 14 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX