Skip to content

Commit da98939

Browse files
TylerMSFTTylerMSFT
authored andcommitted
add fix for github #103
1 parent c8f7a39 commit da98939

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed
Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "gmtime, _gmtime32, _gmtime64"
3-
description: "API reference for gmtime, _gmtime32, and _gmtime64; which convert a time_t value to a tm structure."
4-
ms.date: "4/2/2020"
3+
description: "API reference for `gmtime`, `_gmtime32`, and `_gmtime64` which convert a `time_t` value to a `tm` structure."
4+
ms.date: "10/27/2020"
55
api_name: ["_gmtime32", "gmtime", "_gmtime64", "_o__gmtime32", "_o__gmtime64"]
66
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-time-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0.dll"]
77
api_type: ["DLLExport"]
@@ -10,9 +10,9 @@ f1_keywords: ["gmtime", "_gmtime32", "_gmtime64"]
1010
helpviewer_keywords: ["gmtime32 function", "_gmtime64 function", "gmtime function", "time functions", "_gmtime32 function", "gmtime64 function", "time structure conversion"]
1111
ms.assetid: 315501f3-477e-475d-a414-ef100ee0db27
1212
---
13-
# gmtime, _gmtime32, _gmtime64
13+
# `gmtime`, `_gmtime32`, `_gmtime64`
1414

15-
Converts a **time_t** time value to a **tm** structure. More secure versions of these functions are available; see [gmtime_s, _gmtime32_s, _gmtime64_s](gmtime-s-gmtime32-s-gmtime64-s.md).
15+
Converts a `time_t` time value to a `tm` structure. More secure versions of these functions are available; see [`gmtime_s`, `_gmtime32_s`, `_gmtime64_s`](gmtime-s-gmtime32-s-gmtime64-s.md).
1616

1717
## Syntax
1818

@@ -24,36 +24,36 @@ struct tm *_gmtime64( const __time64_t *sourceTime );
2424
2525
### Parameters
2626
27-
*sourceTime*<br/>
27+
*`sourceTime`*\
2828
Pointer to the stored time. The time is represented as seconds elapsed since midnight (00:00:00), January 1, 1970, coordinated universal time (UTC).
2929
3030
## Return Value
3131
32-
A pointer to a structure of type [tm](../../c-runtime-library/standard-types.md). The fields of the returned structure hold the evaluated value of the *sourceTime* argument in UTC rather than in local time. Each of the structure fields is of type **`int`**, as follows:
32+
A pointer to a structure of type [`tm`](../../c-runtime-library/standard-types.md). The fields of the returned structure hold the evaluated value of the *`sourceTime`* argument in UTC rather than in local time. Each of the structure fields is of type `int`, as follows:
3333
3434
|Field|Description|
3535
|-|-|
36-
|**tm_sec**|Seconds after minute (0 - 59).|
37-
|**tm_min**|Minutes after hour (0 - 59).|
38-
|**tm_hour**|Hours since midnight (0 - 23).|
39-
|**tm_mday**|Day of month (1 - 31).|
40-
|**tm_mon**|Month (0 - 11; January = 0).|
41-
|**tm_year**|Year (current year minus 1900).|
42-
|**tm_wday**|Day of week (0 - 6; Sunday = 0).|
43-
|**tm_yday**|Day of year (0 - 365; January 1 = 0).|
44-
|**tm_isdst**|Always 0 for **gmtime**.|
36+
|`tm_sec`|Seconds after minute (0 - 59).|
37+
|`tm_min`|Minutes after hour (0 - 59).|
38+
|`tm_hour`|Hours since midnight (0 - 23).|
39+
|`tm_mday`|Day of month (1 - 31).|
40+
|`tm_mon`|Month (0 - 11; January = 0).|
41+
|`tm_year`|Year (current year minus 1900).|
42+
|`tm_wday`|Day of week (0 - 6; Sunday = 0).|
43+
|`tm_yday`|Day of year (0 - 365; January 1 = 0).|
44+
|`tm_isdst`|Always 0 for **gmtime**.|
4545
46-
Both the 32-bit and 64-bit versions of **gmtime**, [mktime](mktime-mktime32-mktime64.md), [mkgmtime](mkgmtime-mkgmtime32-mkgmtime64.md), and [localtime](localtime-localtime32-localtime64.md) all use one common **tm** structure per thread for the conversion. Each call to one of these functions destroys the result of any previous call. If *sourceTime* represents a date before midnight, January 1, 1970, **gmtime** returns **NULL**. There's no error return.
46+
Both the 32-bit and 64-bit versions of **`gmtime`**, [`mktime`](mktime-mktime32-mktime64.md), [`mkgmtime`](mkgmtime-mkgmtime32-mkgmtime64.md), and [`localtime`](localtime-localtime32-localtime64.md) all use one common `tm` structure per thread for the conversion. Each call to one of these functions destroys the result of any previous call. If *`sourceTime`* represents a date before midnight, January 1, 1970, **`gmtime`** returns `NULL`. There's no error return.
4747
48-
**_gmtime64**, which uses the **__time64_t** structure, enables dates to be expressed up through 23:59:59, December 31, 3000, UTC, whereas **_gmtime32** only represent dates through 23:59:59 January 18, 2038, UTC. Midnight, January 1, 1970, is the lower bound of the date range for both functions.
48+
**_gmtime64**, which uses the `__time64_t` structure, enables dates to be expressed up through 23:59:59, December 31, 3000, UTC, whereas **`_gmtime32`** only represent dates through 23:59:59 January 18, 2038, UTC. Midnight, January 1, 1970, is the lower bound of the date range for both functions.
4949
50-
**gmtime** is an inline function that evaluates to **_gmtime64**, and **time_t** is equivalent to **__time64_t** unless **_USE_32BIT_TIME_T** is defined. If you must force the compiler to interpret **time_t** as the old 32-bit **time_t**, you can define **_USE_32BIT_TIME_T**, but doing so causes **gmtime** to be in-lined to **_gmtime32** and **time_t** to be defined as **__time32_t**. We recommend that you do not do this, because it is not allowed on 64-bit platforms and in any case your application may fail after January 18, 2038.
50+
**`gmtime`** is an inline function that evaluates to **`_gmtime64`**, and `time_t` is equivalent to `__time64_t` unless `_USE_32BIT_TIME_T` is defined. If you must force the compiler to interpret `time_t` as the old 32-bit `time_t`, you can define `_USE_32BIT_TIME_T`, but doing so causes **`gmtime`** to be in-lined to **`_gmtime32`** and `time_t` to be defined as `__time32_t`. We don't recommend that you do this, because it isn't allowed on 64-bit platforms. In any case, your application may fail after January 18, 2038.
5151
52-
These functions validate their parameters. If *sourceTime* is a null pointer, or if the *sourceTime* value is negative, these functions invoke an invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the functions return **NULL** and set **errno** to **EINVAL**.
52+
These functions validate their parameters. If *`sourceTime`* is a null pointer, or if the *`sourceTime`* value is negative, these functions invoke an invalid parameter handler, as described in [Parameter validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, the functions return `NULL` and set `errno` to `EINVAL`.
5353
5454
## Remarks
5555
56-
The **_gmtime32** function breaks down the *sourceTime* value and stores it in a statically allocated structure of type **tm**, defined in TIME.H. The value of *sourceTime* is typically obtained from a call to the [time](time-time32-time64.md) function.
56+
The **`_gmtime32`** function breaks down the *`sourceTime`* value and stores it in a statically allocated structure of type `tm`, defined in `TIME.H`. The value of *`sourceTime`* is typically obtained from a call to the [`time`](time-time32-time64.md) function.
5757
5858
> [!NOTE]
5959
> In most cases, the target environment tries to determine whether daylight savings time is in effect. The C run-time library assumes that the United States rules for implementing the calculation of Daylight Saving Time (DST) are used.
@@ -64,7 +64,7 @@ By default, this function's global state is scoped to the application. To change
6464
6565
|Routine|Required C header|Required C++ header|
6666
|-------------|---------------------|-|
67-
|**gmtime**, **_gmtime32**, **_gmtime64**|\<time.h>|\<ctime> or \<time.h>|
67+
|**`gmtime`**, **`_gmtime32`**, **`_gmtime64`**|`<time.h>`| `<ctime>` or `<time.h>`|
6868
6969
For additional compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
7070
@@ -81,7 +81,7 @@ For additional compatibility information, see [Compatibility](../../c-runtime-li
8181
#include <time.h>
8282
#include <stdio.h>
8383
84-
int main( void )
84+
int main(void)
8585
{
8686
struct tm *newtime;
8787
__int64 ltime;
@@ -103,12 +103,12 @@ Coordinated universal time is Tue Feb 12 23:11:31 2002
103103

104104
## See also
105105

106-
[Time Management](../../c-runtime-library/time-management.md)<br/>
107-
[asctime, _wasctime](asctime-wasctime.md)<br/>
108-
[ctime, _ctime32, _ctime64, _wctime, _wctime32, _wctime64](ctime-ctime32-ctime64-wctime-wctime32-wctime64.md)<br/>
109-
[_ftime, _ftime32, _ftime64](ftime-ftime32-ftime64.md)<br/>
110-
[gmtime_s, _gmtime32_s, _gmtime64_s](gmtime-s-gmtime32-s-gmtime64-s.md)<br/>
111-
[localtime, _localtime32, _localtime64](localtime-localtime32-localtime64.md)<br/>
112-
[_mkgmtime, _mkgmtime32, _mkgmtime64](mkgmtime-mkgmtime32-mkgmtime64.md)<br/>
113-
[mktime, _mktime32, _mktime64](mktime-mktime32-mktime64.md)<br/>
114-
[time, _time32, _time64](time-time32-time64.md)<br/>
106+
[Time Management](../../c-runtime-library/time-management.md)\
107+
[`asctime`, `_wasctime`](asctime-wasctime.md)\
108+
[`ctime`, `_ctime32`, `_ctime64`, `_wctime`, `_wctime32`, `_wctime64`](ctime-ctime32-ctime64-wctime-wctime32-wctime64.md)\
109+
[`_ftime`, `_ftime32`, `_ftime64`](ftime-ftime32-ftime64.md)\
110+
[`gmtime_s`, `_gmtime32_s`, `_gmtime64_s`](gmtime-s-gmtime32-s-gmtime64-s.md)\
111+
[`localtime`, `_localtime32`, `_localtime64`](localtime-localtime32-localtime64.md)\
112+
[`_mkgmtime`, `_mkgmtime32`, `_mkgmtime64`](mkgmtime-mkgmtime32-mkgmtime64.md)\
113+
[`mktime`, `_mktime32`, `_mktime64`](mktime-mktime32-mktime64.md)\
114+
[`time`, `_time32`, `_time64`](time-time32-time64.md)\

0 commit comments

Comments
 (0)