When an uncached lookup is executed, it is cached and returned (without using JSON.stringify) here. As a result, these dates are displayed in a valid format (here). But when the result is cached (as a result of JSON.stringify), the date loses its type and therefore being toString()'d here (well, I'm not sure, I personally don't like JS btw).
Look at the following screenshot:
Here's the root cause (I think so): https://github.com/MattIPv4/DNS-over-Discord/blob/482d0d071b11a3ba14652d5a1bb5cf318f961a9b/src/utils/cache.js#L13
When an uncached lookup is executed, it is cached and returned (without using
JSON.stringify
) here. As a result, these dates are displayed in a valid format (here). But when the result is cached (as a result ofJSON.stringify
), the date loses its type and therefore beingtoString()
'd here (well, I'm not sure, I personally don't like JS btw).