Short of your code going out to a trusted source such as a known NTP server, you're going to be at the mercy of the local machine.
Even if you did attempt to go out to a trusted source, the local machine could subvert it by capturing your TCP traffic.
And, even if you created your own trusted machine which used encryption to deliver the correct date and time, a local machine could subvert that, simply by changing the JavaScript.
Bottom line, it's an arms race, and almost certainly a fools errand to think you can secure your code against everything. Perhaps it may be a good time to actually think why you need an accurate date in the first place.
If we knew that, we may be able to give advice outside the box you're currently in. Far too many questions of the form "How do I do X in a Y way?" discount a huge number of non-Y potential solutions :-)