-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mismatching sizeof()
for date inner values
#264
Comments
michaelwright235
added a commit
to michaelwright235/plist_plus
that referenced
this issue
Aug 30, 2024
When creating a date the original library expects one to pass the number of seconds since 01/01/2001 (Mac Epoch). Since it's not obvious and we're quite used to standart Unix Timestamps instead, these methods automatically convert dates to Mac Epoch format (just like the `plist` rust library does). Both `set_date_val` method and `set_random_date` test currently panics with an assertion failure due to a [`libplist` bug](libimobiledevice/libplist#264).
michaelwright235
added a commit
to michaelwright235/plist_plus
that referenced
this issue
Aug 30, 2024
When creating a date the original library expects one to pass the number of seconds since 01/01/2001 (Mac Epoch). Since it's not obvious and we're quite used to standart Unix Timestamps instead, these methods automatically convert dates to Mac Epoch format (just like the `plist` rust library does). Both `set_date_val` method and `set_random_date` test currently panics with an assertion failure due to a [`libplist` bug](libimobiledevice/libplist#264).
jkcoxson
pushed a commit
to jkcoxson/plist_plus
that referenced
this issue
Aug 30, 2024
* date: Implement date methods When creating a date the original library expects one to pass the number of seconds since 01/01/2001 (Mac Epoch). Since it's not obvious and we're quite used to standart Unix Timestamps instead, these methods automatically convert dates to Mac Epoch format (just like the `plist` rust library does). Both `set_date_val` method and `set_random_date` test currently panics with an assertion failure due to a [`libplist` bug](libimobiledevice/libplist#264). * date: implement From<SystemTime>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've encountered a bug when I tried using the
plist_set_date_val
function:When I was expecting the code, I found out that arguments of
sizeof
for date related functions are mismatching.plist_new_date(...)
(uses double):plist_set_date_val(...)
(uses timeval):plist_get_date_val(...)
(uses double):The text was updated successfully, but these errors were encountered: