nats-io / natscli

The NATS Command Line Interface
Apache License 2.0
472 stars 96 forks source link

Stream info shows first and last timestamps incorrectly #1030

Closed jarretlavallee closed 5 months ago

jarretlavallee commented 5 months ago

Observed behavior

nats stream info <stream> shows the first sequence and last sequence timestamps with UTC, however, they are displayed in the local timezone.

      First Sequence: 1 @ 2024-03-28 07:22:07 UTC
       Last Sequence: 1,697,011 @ 2024-03-28 07:25:12 UTC

With --json, the time is correctly UTC.

    "first_ts": "2024-03-28T13:22:07.110043Z",
    "last_ts": "2024-03-28T13:25:12.970217Z",

Expected behavior

The time for the first and last sequences should either be in UTC format or the UTC should be removed to indicate it is the local timezone.

Server and client version

nats-server 2.10.12 natcli 0.1.4

Host environment

No response

Steps to reproduce

On a system that is not configured with UTC as the timezone:

ripienaar commented 5 months ago

yeah should just drop the UTC now, all times are local

ripienaar commented 5 months ago

Fixed in https://github.com/nats-io/natscli/pull/1032