This patch removes the 3600 second error in the date/time returned by
the Javascript date() function in RISC OS.

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.

There may be a better solution than this, which I'd like to research,
but this fixes the problem today.

Dave

diff --git a/javascript/duktape/duktape.c b/javascript/duktape/duktape.c
index 5ee88ad..9cd1b10 100644
--- a/javascript/duktape/duktape.c
+++ b/javascript/duktape/duktape.c
@@ -27893,7 +27893,9 @@ DUK_INTERNAL duk_int_t 
duk_bi_date_get_local_tzoffset_gmtime(duk_double_t d) {
                goto error;
        }
        if (tms[1].tm_isdst > 0) {
+#if !defined(riscos)
                t2 += 3600;
+#endif
        } else if (tms[1].tm_isdst < 0) {
                DUK_D(DUK_DPRINT("tm_isdst is negative: %d", (int) 
tms[1].tm_isdst));
        }

____________________________________________________________
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 http://mysecurelogon.com/manager

Reply via email to