I just want to point out that both Date and RealDate reference the same object, so when you replace the function Date.now, it's also changing RealDate.now and your global.Date = RealDate at the end is not doing what you think it's doing.
What you should do if you want to keep and reassign the original now function is keep a reference to that function:
I just want to point out that both
Date
andRealDate
reference the same object, so when you replace the functionDate.now
, it's also changingRealDate.now
and yourglobal.Date = RealDate
at the end is not doing what you think it's doing.What you should do if you want to keep and reassign the original
now
function is keep a reference to that function:Very helpful!
🙊Oh! You're completely right! Thank you so much, I will update my post!!! :)
(sorry for the late answer, I didn't saw the notification...)