Environment:
- LDAP Server Type: ActiveDirectory
- PHP Version: 8.2.4
- LdapRecord Version: 3.8.3
Describe the bug:
I recently stumbled across an error when retrieving certain timestamps from Active Directory (fix at the bottom).
Given an user from Active Directory with the following attribute values in "whenCreated" and "pwdLatSet":


Retrieving the same values with LdapRecord (ignore obvious timezone difference):

"pwdLastSet" is off by 1 second. Digging through the libraries code I discovered that there is a rounding error occuring in certain instances in directorytree/ldaprecord/src/Models/Attributes/Timestamp.php line 193:
round($value / 10000000) - 11644473600
Replacing this with a simple cast to int ((int)($value / 10000000)) - 11644473600 solves the issue:

Environment:
Describe the bug:
I recently stumbled across an error when retrieving certain timestamps from Active Directory (fix at the bottom).
Given an user from Active Directory with the following attribute values in "whenCreated" and "pwdLatSet":


Retrieving the same values with LdapRecord (ignore obvious timezone difference):

"pwdLastSet" is off by 1 second. Digging through the libraries code I discovered that there is a rounding error occuring in certain instances in
directorytree/ldaprecord/src/Models/Attributes/Timestamp.phpline 193:round($value / 10000000) - 11644473600Replacing this with a simple cast to int

((int)($value / 10000000)) - 11644473600solves the issue: