From cb76e4da84c61609c13e84c922f14a27b8348a36 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Tue, 13 May 2025 18:34:32 +0200 Subject: Add plist_new_unix_date, plist_get_unix_date_val, plist_set_unix_date_val functions These functions work with int64_t values representing a UNIX timestamp instead of using the 'MAC epoch'. They should be used instead of plist_new_date, plist_get_date_val, and plist_set_date_val, which are now marked deprecated and might be removed in a future version of libplist. --- cython/plist_util.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cython/plist_util.h') diff --git a/cython/plist_util.h b/cython/plist_util.h index fbf56b6..e0a84b5 100644 --- a/cython/plist_util.h +++ b/cython/plist_util.h @@ -1,5 +1,5 @@ #include -void datetime_to_ints(PyObject* obj, int32_t* sec, int32_t* usec); -PyObject* ints_to_datetime(int32_t sec, int32_t usec); +int64_t datetime_to_timestamp(PyObject* obj); +PyObject* timestamp_to_datetime(int64_t sec); int check_datetime(PyObject* obj); -- cgit v1.1-32-gdbae