Skip to content

Timestamp fractional seconds with positive exponent and non zero coefficient should return an error #182

@desaikd

Description

@desaikd

PR #181 which addressed the issue #180 didn't include an error when timestamp fractional second has positive exponent and non zero coefficient .

// check if the scale is negative and coefficient is zero then set exponent value to 0
// otherwise set exponent value as per the scale value
if d.scale < 0 && nsec == 0 {
   exponent = uint8(0)  // if nsec != 0 && d.scale < 0 then RETURN AN ERROR
} else {
   exponent = uint8(d.scale)
}

Also, there are no tests in the test harness for timestamp fractional second with positive exponent and non zero coefficient We should add more tests for timestamp fractional seconds.

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