Skip to content

TimeNode test fails in GMT #3

@aranwe

Description

@aranwe

Test JsepTest.timeTest() fails on line 204 for User with GMT timezone:

JsepTest.cls

...
        node = (Jsep.TimeNode )new Jsep(s4).parse();
        System.assertEquals(true, node.value!=v); // line 204
        System.assertEquals(node.getType(), Jsep.JSEP_TIME);
...

Repro

Given you execute anonymously:

String s = '01:08:54.474';
String s4= '1:8:54.474Z';
Time v = (Time)JSON.deserialize('"' + s + '"', Time.class);
Jsep.TimeNode node = (Jsep.TimeNode )new Jsep(s4).parse();

System.debug(node.value!=v);
System.debug(node.value);
System.debug(v);

Then for User with timezone "Africa/Brazzaville" prints:

05:54:42.68 (80498067)|USER_DEBUG|[6]|DEBUG|true
05:54:42.68 (80559117)|USER_DEBUG|[7]|DEBUG|01:08:54.474Z
05:54:42.68 (80574435)|USER_DEBUG|[8]|DEBUG|09:08:54.474Z

For User with timezone "GMT" (or any other GMT+00:00) prints:

12:58:44.88 (100847623)|USER_DEBUG|[6]|DEBUG|false
12:58:44.88 (100898952)|USER_DEBUG|[7]|DEBUG|01:08:54.474Z
12:58:44.88 (100916055)|USER_DEBUG|[8]|DEBUG|01:08:54.474Z

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions