Skip to content

Commit e04061e

Browse files
author
Jure Bajic
committed
Add comment
1 parent fc2a141 commit e04061e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/glue.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,10 @@ PyObject *mg_local_time_to_py_time(const mg_local_time *lt) {
284284
SCOPED_CLEANUP PyObject *seconds =
285285
PyLong_FromLongLong(nanos / one_sec_to_nanos);
286286
const int64_t leftover_nanos = nanos % one_sec_to_nanos;
287+
// The reason for different implementation of getting utc time from timestamp
288+
// is because we need to explicitly define utc timezone on Windows unlike on
289+
// linux, but that API is only allowed in py3.7, therefore the support for
290+
// Windows is only for python version >= 3.7.
287291
#ifdef _WIN32
288292
SCOPED_CLEANUP PyObject *method_name = PyUnicode_FromString("fromtimestamp");
289293
IF_PTR_IS_NULL_RETURN(method_name, NULL);

0 commit comments

Comments
 (0)