Skip to content

Metrics OStream exporter prints time into local time zone #1345

Description

@ThomsonTan

The OStream metrics exporter prints time to string based on local time zone, which fails tests like OStreamMetricsExporter.ExportDropPointData with below message.

391: With diff:
391: @@ -3,6 +3,6 @@
391:    schema url\t:
391:    version\t: 1.2.0
391: -  start time\t: Wed Dec 31 16:00:00 1969
391: -  end time\t: Wed Dec 31 16:00:00 1969
391: +  start time\t: Thu Jan  1 00:00:00 1970
391: +  end time\t: Thu Jan  1 00:00:00 1970
391:    description\t: description
391:    unit\t\t: unit
391:

Steps to reproduce
Run test OStreamMetricsExporter.ExportDropPointData on a machine not in UTC timezone.

What is the expected behavior?
The test should pass.

What is the actual behavior?
The test failed with above output log.

Additional context
Add any other context about the problem here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions