INT GetTimeFormatA ( LCID lcid, DWORD dwFlags, const SYSTEMTIME* lpTime, LPCSTR lpFormat, LPSTR lpTimeStr, INT cchOut )
Format a time for a given locale.
|lcid||[In]||Locale to format for.|
|dwFlags||[In]||LOCALE_ and TIME_ flags from "winnls.h".|
|lpTime||[In]||Time to format.|
|lpTimeStr||[Out]||Destination for formatted string.|
|cchOut||[In]||Size of lpTimeStr, or 0 to calculate the resulting size.|
- If lpFormat is NULL, lpszValue will be formatted according to the format details returned by GetLocaleInfoA and modified by dwFlags.
- lpFormat is a string of characters and formatting tokens. Any characters in the string are copied verbatim to lpTimeStr, with tokens being replaced by the time values they represent.
- The following tokens have special meanings in a time format string:
Token Meaning ----- ------- h Hours with no leading zero (12-hour clock) hh Hours with full two digits (12-hour clock) H Hours with no leading zero (24-hour clock) HH Hours with full two digits (24-hour clock) m Minutes with no leading zero mm Minutes with full two digits s Seconds with no leading zero ss Seconds with full two digits t Short time marker (e.g. "A" or "P") tt Long time marker (e.g. "AM", "PM")
- To output any literal character that could be misidentified as a token, enclose it in single quotes.
- The Ascii version of this function fails if lcid is Unicode only.
Success: The number of character written to lpTimeStr, or that would have been written, if cchOut is 0.
Failure: 0. Use GetLastError to determine the cause.
Declared in "winnls.h". https://source.winehq.org/source/include/winnls.h
Implemented in "dlls/kernel32/lcformat.c". https://source.winehq.org/source/dlls/kernel32/lcformat.c
Debug channel "nls".
Copyright © 2020 The Wine Project. All trademarks are the property of their respective owners. Visit WineHQ for license details. Generated Mar 2020.