datalust / seq-tickets

Issues, design discussions and feature roadmap for the Seq log server
https://datalust.co/seq
96 stars 5 forks source link

Filtering the Timestamp based on the local timezone of the computer that uploaded the log to seq #2174

Closed gplogix closed 3 months ago

gplogix commented 5 months ago

Our request is trivial, we have differents computers having different timezone and issues are created by the local user of these computers and contact us by email without specifiying his timezone neither the offset. I can not find the log because of this.

Example of log send to seq from a computer running in +01:00 : {"@t":"2024-04-18T12:49:47.7320000+01:00","@mt":"test",...

The distant user explains that the problem occurs at 12:49

If I filter like this, the entry is not found because of UTC by default @Timestamp > DateTime('2024-04-18T12:00:00') and @Timestamp > DateTime('2024-04-18T13:00:00')

If my personal timezone is +02:00 the date displayed in the UI is "2024-04-18 11:49:47.732"

The only way to filter is using the offset of the distant user... Information we don't have... @Timestamp > DateTime('2024-04-18T12:00:00+01:00') and @Timestamp > DateTime('2024-04-18T13:00:00+01:00')

The main problem is that the initial time offset is flattened to utc in Seq and thus lost the original time offset. Exporting a log from the same distant computer (Export/Copy Raw JSON) doesn't display the original JSON as the date is in UTC.

KodrAus commented 5 months ago

Hi @gplogix :wave: Seq always stores timestamps in UTC to simplify its internal logic around time ordering, and to simplify integration with and consumption by other systems.

If users aren't providing enough information for you to filter the logs by then you may be able to find what you're after using signals and a wider time range. Seq's date box has forward and back arrows that are useful for quickly scanning through blocks of logs.