Skip to content

Datetime Test #27

Description

@aranwe

Hi,

Tests fail when User have different timezone to GMT.
Log:

RTest.toTest    System.AssertException: Assertion Failed: Expected: 2017-12-31 23:00:00, Actual: 2018-01-01 00:00:00
in classes/RTest.cls:396:1

This is in my opinion false positive and Rtest.cls:393 should be:

--- Datetime mDatetime = Datetime.newInstance(2018, 1, 1);
+++ Datetime mDatetime = Datetime.newInstanceGmt(2018, 1, 1);

There should probably be method R.toDatetimeGmt(); to avoid confusion on timezone R uses internally.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions