Patch to correct Javascript date() result

Dave Higton dave at
Fri Sep 25 20:53:04 BST 2015

In message <OUT-5605AFD5.MD-1.4.17.chris.young at>
          "Chris Young" <chris.young at> wrote:

>On Fri, 25 Sep 2015 20:04:53 +0100, Dave Higton wrote:
>> >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.
>A quick check on AmigaOS reveals it's wrong here on two counts.... or
>maybe it's wrongly correct, I'm not sure.
>Today is 2015-09-25 21:28:16.916+02:00
>Are you getting the correct timezone on RISC OS?

Without my patch, the time is 1 hour in advance and the offset is
shown as +02:00, like you see.

With my patch, the time is correct and the offset is shown as +01:00.

It's possible that the AmigaOS code is running through the error.
All I did was prevent the error on RISC OS, leaving the code for
other platforms unchanged.


Can't remember your password? Do you need a strong and secure password?
Use Password manager! It stores your passwords & protects your account.
Check it out at

More information about the netsurf-dev mailing list