summaryrefslogtreecommitdiffstats
path: root/src/oplist.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/oplist.c')
-rw-r--r--src/oplist.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/oplist.c b/src/oplist.c
index 292467f..4b3b666 100644
--- a/src/oplist.c
+++ b/src/oplist.c
@@ -301,7 +301,10 @@ static plist_err_t node_to_openstep(node_t node, bytearray_t **outbuf, uint32_t
break;
case PLIST_DATE:
if (coerce) {
- Time64_T timev = (Time64_T)node_data->realval + MAC_EPOCH;
+ Time64_T timev;
+ if (plist_real_to_time64(node_data->realval, &timev) < 0) {
+ return PLIST_ERR_INVALID_ARG;
+ }
struct TM _btime;
struct TM *btime = gmtime64_r(&timev, &_btime);
char datebuf[32];