I'm trying to make a job run somewhere in the future, like this:
job.after(scheduledAt).save()
where scheduledAt is a date object in the future, example:
Tue Nov 14 2016 21:55:00 GMT+0100 (CET)
No matter the value, when I check the created job document, the result is that after is set to new Date(). For example, this particular date object was saved in the job document as:
`after: 2016-11-14 21:51:07.6880 +01:00'
Interestingly, it does work correctly when the day is set to minimum tomorrow. I have the feeling the comparison future < now is not working correctly, perhaps not taking timezone into account.
I'm trying to make a job run somewhere in the future, like this:
job.after(scheduledAt).save()
where scheduledAt is a date object in the future, example:
Tue Nov 14 2016 21:55:00 GMT+0100 (CET)
No matter the value, when I check the created job document, the result is that after is set to new Date(). For example, this particular date object was saved in the job document as:
`after: 2016-11-14 21:51:07.6880 +01:00'
Interestingly, it does work correctly when the day is set to minimum tomorrow. I have the feeling the comparison future < now is not working correctly, perhaps not taking timezone into account.
What is going wrong?