Dayjs is not picking the current system time

Hello everyone I am trying to use Dayjs() with format to get the current time with the specified format but every time I run my cypress test it gives me an old time. Here is the code below:

const presentDateTime = dayjs().format('DD MMM YYYY HH:MM:ss');
            engreenPo.firstNameLastName.then((text1) => {
                engreenPo.dynamicPushHeader.should('contain', `${presentDateTime} by ${text1}`);

And I always get this output

31 Aug 2021 13:08:11

Even though in my local system it’s 13:43 but it is stuck at that particular time. I directly used Dayjs() with format in the should assertion but still its the same. I am not sure if this information is enough to diagnose the problem. Help would be highly appreciated. Thank you


The big MM stands for Month, the small mm stands for minutes.

const presentDateTime = dayjs().format('DD MMM YYYY HH:mm:ss');

// Dynamic Example

setInterval(() =>
  let presentDateTime = dayjs().format('DD MMM YYYY HH:mm:ss');
  document.getElementById('time').innerText = presentDateTime;
<script src="" integrity="sha512-bwD3VD/j6ypSSnyjuaURidZksoVx3L1RPvTkleC48SbHCZsemT3VKMD39KknPnH728LLXVMTisESIBOAb5/W0Q==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<div id="time"></div>