Hey folks, I am testing function in jest which uses the Date.
time = new Date(startDate).toLocaleString('en-US', {
timeZone: 'America/Los_Angeles,
hour: '2-digit',
minute: '2-digit'
});
while running the test locally, it returns me the time in format 07:00 AM which is expected. And it works in my code also but the same test returns 7:00 AM when these tests are run on jenkins CI pipeline which results in failing tests on CI.
Any idea what could be causing that?