diff options
Diffstat (limited to 'src/xplist.c')
| -rw-r--r-- | src/xplist.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/xplist.c b/src/xplist.c index 8f5cb15..3157ab0 100644 --- a/src/xplist.c +++ b/src/xplist.c | |||
| @@ -192,7 +192,10 @@ static plist_err_t node_to_xml(node_t node, bytearray_t **outbuf, uint32_t depth | |||
| 192 | tag = XPLIST_DATE; | 192 | tag = XPLIST_DATE; |
| 193 | tag_len = XPLIST_DATE_LEN; | 193 | tag_len = XPLIST_DATE_LEN; |
| 194 | { | 194 | { |
| 195 | Time64_T timev = (Time64_T)node_data->realval + MAC_EPOCH; | 195 | Time64_T timev; |
| 196 | if (plist_real_to_time64(node_data->realval, &timev) < 0) { | ||
| 197 | return PLIST_ERR_INVALID_ARG; | ||
| 198 | } | ||
| 196 | struct TM _btime; | 199 | struct TM _btime; |
| 197 | struct TM *btime = gmtime64_r(&timev, &_btime); | 200 | struct TM *btime = gmtime64_r(&timev, &_btime); |
| 198 | if (btime) { | 201 | if (btime) { |
