metaeducation / rebol-issues

6 stars 1 forks source link

Adding zone value to DATE without time should work correctly #2369

Open Oldes opened 5 years ago

Oldes commented 5 years ago

In R3-alpha it first adds time and on second call zone:

>> d: 28-Mar-2019
== 28-Mar-2019

>> d/zone: 1 d
== 28-Mar-2019/0:00

>> d/zone: 1 d
== 28-Mar-2019/0:00+1:00

In Rebol2 it was buggy too:

>> d: 28-Mar-2019
== 28-Mar-2019
>> d/zone: 1
** Script Error: Invalid argument: 1
** Near: d/zone: 1
>> d/zone: 1:0 d
== 28-Mar-2019+1:00

In Ren-C it throws an error:

>>  d: 28-Mar-2019
== 28-Mar-2019

>> d/zone: 2
ⓘ   Note: use WHY for error information
** Error: Can't set /ZONE in a DATE! with no time component
** Where: console
** Near: [d zone ~~]
** Line: 1

In Red it adds the required time value too:

>> d: 28-Mar-2019
== 28-Mar-2019
>> d/zone: 1 d
== 28-Mar-2019/0:00:00+01:00