vishalxl / nostr_console

Nostr console is an open-source twitter-like social network, direct chat app and group chat all bundled into one program. Built on the decentralized Nostr protocol.
GNU Affero General Public License v3.0
439 stars 33 forks source link

[BUG?] Post/reply timestamp displayed is in GMT in comparison to user timezone/system time #59

Closed Sakhalinfox closed 5 months ago

Sakhalinfox commented 1 year ago

Issue Description

Creating any post/replies on Nostr_Console displays the time in GMT on console. It can be a bit confusing for the end user viewing the timestamps comparing it to their system time (in my case [GMT-05:00] / EST) and knowing when they actually made the post.

Steps to Reproduce

  1. Create a new post/reply on Nostr_Console.
  2. Review the post time and date in comparison to system time or created_at time in the metadata. There's a different of +5 hours (for me).

Screenshots from Nostr_Console: image

Metadata created_at date/time: image 1672697081 Epoch unix time = GMT: Monday, January 2, 2023 10:04:41 PM

Expected output:

Monday, January 2, 2023 5:04:41 PM (GMT-05:00). Need to perform conversion of the GMT time to user's timezone and display in the post timestamp.

Example reproduction details Event ID: 02c17553731d7746800881043f1854b95d5cbdea4028d0b2020a16cb5da32f1e Note ID: note1qtqh25mnr4m5dqqgsyzr7xz5h9w4e002gq5dpvszpgtvkhdr9u0qk5z5gy

Test Environment Details

vishalxl commented 1 year ago

This has likely something to do with the docker not getting the local time zone, and/or not supplying it to the dart program running.