I searched for "time in Portugal". The "onebox" result flashes the correct time, but then gives a NaN error. Screenshot attached.
To see the current time in Portugal.
I searched for "time in Portugal". The "onebox" result flashes the correct time, but then gives a NaN error. Screenshot attached.
To see the current time in Portugal.
It looks like this is happening for all time searches. The page shows the correct time when it renders but when the JavaScript live updating takes over it fills the screen with NaNs.
A quick update: this is only happening in Webkit browsers (ironic considering Kagi produces Orion) – it works in Chrome & Firefox. The issue is caused within Kagi's initTimeWidget()
function, where it tries creating a new Date instance using the data-now
value from the page's HTML, which is formatted in a way that Chrome etc can parse but not Webkit.
I recommend Kagi use ISO 8601 when outputting the initial date for that data-now
attribute which will then be parsed correctly by all browsers.
adamaveray Thanks for the throrough investigation!