Skip to content

Commit 0fcd9e3

Browse files
authored
Correct CmsProfile creation_date month (#9804)
1 parent 8bbb9ec commit 0fcd9e3

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

Tests/test_imagecms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ def truncate_tuple(tuple_value: tuple[Any, ...]) -> tuple[Any, ...]:
418418
assert p.colorimetric_intent is None
419419
assert p.connection_space == "XYZ "
420420
assert p.copyright == "Copyright International Color Consortium, 2009"
421-
assert p.creation_date == datetime.datetime(2009, 2, 27, 21, 36, 31)
421+
assert p.creation_date == datetime.datetime(2009, 3, 27, 21, 36, 31)
422422
assert p.device_class == "mntr"
423423
assert_truncated_tuple_equal(
424424
p.green_colorant,

src/_imagingcms.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,13 @@ cms_profile_getattr_creation_date(CmsProfileObject *self, void *closure) {
10431043
}
10441044

10451045
return PyDateTime_FromDateAndTime(
1046-
1900 + ct.tm_year, ct.tm_mon, ct.tm_mday, ct.tm_hour, ct.tm_min, ct.tm_sec, 0
1046+
1900 + ct.tm_year,
1047+
ct.tm_mon + 1,
1048+
ct.tm_mday,
1049+
ct.tm_hour,
1050+
ct.tm_min,
1051+
ct.tm_sec,
1052+
0
10471053
);
10481054
}
10491055

0 commit comments

Comments
 (0)