Patch to correct Javascript date() result

Dave Higton dave at davehigton.me.uk
Fri Sep 25 20:04:53 BST 2015


In message <OUT-5605862A.MD-1.4.17.chris.young at unsatisfactorysoftware.co.uk>
          "Chris Young" <chris.young at unsatisfactorysoftware.co.uk> wrote:

>On Thu, 24 Sep 2015 22:02:21 +0100, Dave Higton wrote:
>
>> The error is in duktape.c and, as discussed on Monday, I don't think
>> the code can ever be right - but I've made the deliberate error apply
>> only to platforms other than RISC OS.
>
>If you can point us to a test page, maybe we can find out whether this
>is RISC OS only or (as I suspect) a problem with all supported
>platforms?

The attached will do.

Please bear in mind that there are various possible paths through the
code that gets the date.  (It's definitely the Date() function that
is in error, not the toString() function.)  So a different platform
may or may not show the error.

The addition of 3600 seconds is such a deliberate inclusion that I
have to ask whether it was required on some platform.  It is my
understanding that localtime() should return the time taking into
account both the time zone and possible daylight savings, so really
it shouldn't be necessary.

Dave

____________________________________________________________
FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
Check it out at http://www.inbox.com/earth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listmaster.pepperfish.net/pipermail/netsurf-dev-netsurf-browser.org/attachments/20150925/ef7662ac/Date.html


More information about the netsurf-dev mailing list