mirror of
https://github.com/owntone/owntone-server.git
synced 2025-02-26 12:59:19 -05:00
[filescanner] Convert plist timestamps to Unix when importing iTunes XML
This commit is contained in:
parent
97233d4753
commit
4a16384d3a
@ -227,9 +227,11 @@ get_dictval_date_from_key(plist_t dict, const char *key, uint32_t *val)
|
|||||||
if (plist_get_node_type(node) != PLIST_DATE)
|
if (plist_get_node_type(node) != PLIST_DATE)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
// secs will be number of seconds since 01/01/2001
|
||||||
plist_get_date_val(node, &secs, &dummy);
|
plist_get_date_val(node, &secs, &dummy);
|
||||||
|
|
||||||
*val = (uint32_t) secs;
|
// make it a Unix Timestamp by adding seconds from 1/1/1970 to 1/1/2001
|
||||||
|
*val = (uint32_t) (secs + 978307200);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user