Skip to content

Commit 7cf1aaa

Browse files
authored
Merge pull request MicrosoftDocs#3663 from majobara-ms/majobara-ms-patch-asctime
asctime function pad signle-digit days with a leading space.
2 parents afd0b2a + 8c08407 commit 7cf1aaa

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/c-runtime-library/reference/asctime-s-wasctime-s.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ The **asctime** function converts a time stored as a structure to a character st
8585

8686
The converted character string is also adjusted according to the local time zone settings. See the [time, _time32, _time64](time-time32-time64.md), [_ftime, _ftime32, _ftime64](ftime-ftime32-ftime64.md), and [localtime_s, _localtime32_s, _localtime64_s](localtime-s-localtime32-s-localtime64-s.md) functions for information about configuring the local time and the [_tzset](tzset.md) function for information about defining the time zone environment and global variables.
8787

88-
The string result produced by **asctime_s** contains exactly 26 characters and has the form `Wed Jan 02 02:03:55 1980\n\0`. A 24-hour clock is used. All fields have a constant width. The new line character and the null character occupy the last two positions of the string. The value passed in as the second parameter should be at least this big. If it is less, an error code, **EINVAL**, will be returned.
88+
The string result produced by **asctime_s** contains exactly 26 characters and has the form `Wed Jan 2 02:03:55 1980\n\0`. A 24-hour clock is used. All fields have a constant width. The new line character and the null character occupy the last two positions of the string. The value passed in as the second parameter should be at least this big. If it is less, an error code, **EINVAL**, will be returned.
8989

9090
**_wasctime_s** is a wide-character version of **asctime_s**. **_wasctime_s** and **asctime_s** behave identically otherwise.
9191

docs/c-runtime-library/reference/asctime-wasctime.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ The **asctime** function converts a time stored as a structure to a character st
5454

5555
The converted character string is also adjusted according to the local time zone settings. For information about configuring the local time, see the [time](time-time32-time64.md), [_ftime](ftime-ftime32-ftime64.md), and [localtime](localtime-localtime32-localtime64.md) functions and the [_tzset](tzset.md) function for information about defining the time zone environment and global variables.
5656

57-
The string result produced by **asctime** contains exactly 26 characters and has the form `Wed Jan 02 02:03:55 1980\n\0`. A 24-hour clock is used. All fields have a constant width. The newline character and the null character occupy the last two positions of the string. **asctime** uses a single, statically allocated buffer to hold the return string. Each call to this function destroys the result of the previous call.
57+
The string result produced by **asctime** contains exactly 26 characters and has the form `Wed Jan 2 02:03:55 1980\n\0`. A 24-hour clock is used. All fields have a constant width. The newline character and the null character occupy the last two positions of the string. **asctime** uses a single, statically allocated buffer to hold the return string. Each call to this function destroys the result of the previous call.
5858

5959
**_wasctime** is a wide-character version of **asctime**. **_wasctime** and **asctime** behave identically otherwise.
6060

@@ -104,7 +104,7 @@ int main( void )
104104
```
105105
106106
```Output
107-
Current date and time: Sun Feb 03 11:38:58 2002
107+
Current date and time: Sun Feb 3 11:38:58 2002
108108
```
109109

110110
## See also

0 commit comments

Comments
 (0)