jborean93 / smbprotocol

Python SMBv2 and v3 Client
MIT License
309 stars 72 forks source link

SMBDirEntryInformation.last_write_time is of type date, expected a datetime #279

Closed christianknoepfle closed 1 month ago

christianknoepfle commented 1 month ago

Hi,

I was wondering why the SMBDirEntryInformation.last_write_time is defined as date and not datetime. All other *_time fields are defined as datetime. I just came across the issue, because intellij highlighted that as a warning in my code where I use a lot of typing.

When running some tests the field value is a datetime, so I would assume that this is a typo. Right or Wrong?

I am using the latest smbclient 1.13.0

Thanks and best regards

Christian

adiroiban commented 1 month ago

Thanks for the report.

I see that hte change was introduced as part of this PR and it was reviewed and approved https://github.com/jborean93/smbprotocol/pull/251

I guess that datetime is the correct type.

If you have time, please consider creating a PR to fix this.

Thanks again!

jborean93 commented 1 month ago

Thanks for the bug report and even more thanks for the PR that fixes this!

jborean93 commented 1 month ago

Fixed by https://github.com/jborean93/smbprotocol/pull/280