Skip to content

Commit d711f28

Browse files
committed
review fixes
1 parent 09a3dac commit d711f28

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Python/pytime.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,6 @@ _PyTime_windows_filetime(time_t timer, struct tm *tm, int is_local)
348348
tm->tm_wday = st_result.wDayOfWeek; /* 0=Sunday */
349349

350350
// `time.gmtime` and `time.localtime` will return `struct_time` containing this
351-
// not currently used by `datetime` module
352351
tm->tm_yday = _PyTime_calc_yday(&st_result);
353352

354353
/* DST flag: -1 (unknown) for local time on historical dates, 0 for UTC */
@@ -1324,7 +1323,7 @@ _PyTime_localtime(time_t t, struct tm *tm)
13241323
{
13251324
#ifdef MS_WINDOWS
13261325
if (t >= 0) {
1327-
/* For non-negative timestamps, use standard conversion */
1326+
/* For non-negative timestamps, use localtime_s() */
13281327
int error = localtime_s(tm, &t);
13291328
if (error != 0) {
13301329
errno = error;
@@ -1366,7 +1365,7 @@ int
13661365
_PyTime_gmtime(time_t t, struct tm *tm)
13671366
{
13681367
#ifdef MS_WINDOWS
1369-
/* For non-negative timestamps, use standard conversion */
1368+
/* For non-negative timestamps, use gmtime_s() */
13701369
if (t >= 0) {
13711370
int error = gmtime_s(tm, &t);
13721371
if (error != 0) {

0 commit comments

Comments
 (0)