Mock Timezone in PhantomJS for Jasmine Test
<p>Is it possible to mock a timezone in Jasmine to test a date object?</p>

<p>I have a function which takes A UTC time string and converts it to a date object.</p>

<p>Using "2016-01-16T07:29:59+0000", I want to be able to verify that when we are in PST we are observing 2016-01-<strong>15 23:29:59</strong> as the local date/time</p>

<p>I'd like to be able to switch this time zone back to GMT and then ensure that we observe 2016-01-<strong>16 07:29:59</strong> as the local date/time</p>

<p>(How) is this possible? (I am running my Jasmine spec through Grunt with phantomjs)</p>

<p>My function for reference:</p>

<pre><code>utcDateStringToDateObject: function(dateString){
    return dateString.indexOf('+')&gt;-1 ? new Date(dateString.split('+')[0]) : new Date(dateString);
}
</code></pre>