Unison Help
- Unison Kernel
- Pthreads
- pthread_create()
- pthread_exit()
- pthread_self()
- pthread_equal()
- pthread_join()
- pthread_detach()
- pthread_setschedparam()
- pthread_getschedparam()
- pthread_attr_init()
- pthread_attr_destroy()
- pthread_attr_setstackaddr()
- pthread_attr_getstackaddr()
- pthread_attr_setstacksize()
- pthread_attr_getstacksize()
- pthread_attr_setschedparam()
- pthread_attr_getschedparam()
- pthread_attr_setdetachstate()
- pthread_attr_getdetachstate()
- pthread_stackinfo()
- pthread_setprio()
- pthread_getprio()
- sched_get_priority_max()
- sched_get_priority_min()
- sched_yield()
- Pthread Cancellation
- Mutex
- Semaphores
- Message Queues
- Conditional Variables
- Barriers
- Timers
- Clocks
- Memory Allocation
- Rendezvous
- Interrupts
- Directory Services
- Miscellaneous
- Pthreads
- Unison I/O Library
- Unison STDIO Library
- STDIO Library Calls
- clearerr()
- dprintf()
- fclose()
- fdopen()
- feof()
- ferror()
- fileno()
- fflush()
- fgetc()
- fgetpos()
- fgets()
- fopen()
- fprintf()
- fputc()
- fputs()
- fread()
- freopen()
- fscanf()
- fseek()
- fseeko()
- fsetpos()
- ftell()
- ftello()
- fwrite()
- getc()
- getc_unlocked()
- getchar()
- getchar_unlocked()
- getdelim()
- getline()
- gets()
- get_stderr_ptr()
- get_stdin_ptr()
- get_stdout_ptr()
- noperprintf()
- perprintf()
- perror()
- posix_compat()
- printf()
- putc()
- putc_unlocked()
- putchar()
- putchar_unlocked()
- puts()
- remove()
- rewind()
- scanf()
- setbuf()
- setvbuf()
- snprintf()
- sprintf()
- sscanf()
- stderr_init()
- stderr_close()
- stdin_init()
- stdin_close()
- stdout_init()
- stdout_close()
- vdprintf()
- vscanf()
- vsscanf()
- vfscanf()
- vprintf()
- vsnprintf()
- vsprintf()
- vfprintf()
- ungetc()
- Do-nothing Stubs
- STDIO Library Calls
- Unison LIBC Library
- Unison I/O Servers
- Graphics, Camera, Video, Audio
- Network Protocols
- TCP and UDP Server - tcpd
- DHCP Client Service - dhcp client
- DHCP Server - dhcpd
- Telnet Server - telnetd
- Tiny FTP Server - tftpd
- Point to Point - pppd
- Network Translation - NAT with PAT
- Firewall
- Tiny HTTP Server - thttpd
- Tiny HTTP Server with TLS
- POP3 Server
- Simple Mail Transfer Protocol Services (SMTP)
- Bootp Protocol
- File Transfer Protocol Server (FTP)
- File Transfer Client Services
- RPC / XDR
- DNS Client
- HTTP/HTTPS Client
- REST Client
- AutoIP Service - autoip client
- mDNS server - mdnsd
- SNTP Client
- SNMP Agent - Snmpd server
- SSL/TLS library
- SSH server
- IP security
- Power Control
- Serial I/O
- System Services
- Universal Serial Bus (USB)
- Wireless
- Remedy Tools for Unison
4.1.6.strftime() #
NAME
strftime – convert date and time to a string
SYNOPSIS
#include <time.h>
- size_t strftime(char *s, size_t maxsize, const char *format, const struct tm *timeptr);
DESCRIPTION
The strftime() function formats the information from timeptr into the buffer s, according to the string pointed to by format.
The format string consists of zero or more conversion specifications and ordinary characters. All ordinary characters are copied directly into the buffer. A conversion specification consists of a percent sign ‘%’ and one other character.
No more than maxsize characters will be placed into the array. If the total number of resulting characters, including the terminating NUL character, is not more than maxsize, strftime() returns the number of characters in the array, not counting the terminating NUL. Otherwise, zero is returned and the buffer contents are indeterminate.
The following conversion specifiers are supported:
- a
- Replaced by the locale’s abbreviated weekday name. [tm_wday]
- A
- Replaced by the locale’s full weekday name. [tm_wday]
- b
- Replaced by the locale’s abbreviated month name. [tm_mon]
- B
- Replaced by the locale’s full month name. [tm_mon]
- c
- Replaced by the locale’s appropriate date and time representation.
- C
- Replaced by the year divided by 100 and truncated to an integer, as a decimal number. [tm_year]
- d
- Replaced by the day of the month as a decimal number [01,31]. [tm_mday]
- D
- Equivalent to %m / %d / %y. [tm_mon, tm_mday, tm_year]
- e
- Replaced by the day of the month as a decimal number [1,31]; a single digit is preceded by a space. [tm_mday]
- h
- Equivalent to %b . [tm_mon]
- H
- Replaced by the hour (24-hour clock) as a decimal number [00,23]. [tm_hour]
- I
- Replaced by the hour (12-hour clock) as a decimal number [01,12]. [tm_hour]
- j
- Replaced by the day of the year as a decimal number [001,366]. [tm_yday]
- m
- Replaced by the month as a decimal number [01,12]. [tm_mon]
- M
- Replaced by the minute as a decimal number [00,59]. [tm_min]
- n
- Replaced by a <newline>.
- p
- Replaced by the locale’s equivalent of either a.m. or p.m. [tm_hour]
- r
- Replaced by the time in a.m. and p.m. notation. [tm_hour, tm_min, tm_sec]
- R
- Replaced by the time in 24-hour notation (%H : %M). [tm_hour, tm_min]
- S
- Replaced by the second as a decimal number [00,60]. [tm_sec]
- t
- Replaced by a <tab>.
- T
- Replaced by the time (%H : %M : %S). [tm_hour, tm_min, tm_sec]
- U
- Replaced by the week number of the year as a decimal number [00,53]. The first Sunday of January is the first day of week 1; days in the new year before this are in week 0. [tm_year, tm_wday, tm_yday]
- w
- Replaced by the weekday as a decimal number [0,6], with 0 representing Sunday. [tm_wday]
- W
- Replaced by the week number of the year as a decimal number [00,53]. The first Monday of January is the first day of week 1; days in the new year before this are in week 0. [tm_year, tm_wday, tm_yday]
- y
- Replaced by the last two digits of the year as a decimal number [00,99]. [tm_year]
- Y
- Replaced by the year as a decimal number (for example, 1997). [tm_year]
- Z
- Replaced by the timezone name or abbreviation, or by no bytes if no timezone information exists. [tm_isdst]
- %
- Replaced by %.
RETURN VALUES
If the total number of resulting bytes including the terminating null byte is not more than maxsize, this function returns the number of bytes placed into the array pointed to by s, not including the terminating NUL character. Otherwise, 0 is returned and the contents of the array are unspecified.
ERRORS
No errors are defined.
