tracing icon indicating copy to clipboard operation
tracing copied to clipboard

appender: Add offset time setting

Open hubertshelley opened this issue 2 years ago • 2 comments

Motivation

Solution

hubertshelley avatar Jul 15 '22 07:07 hubertshelley

The downside of this approach is that the use of a hard-coded offset does not handle daylight savings. I feel that if we're to support non-UTC timestamps inside of tracing-appender, we should use LocalTime to handle this correctly. While that is more expensive call than a UTF offset, it will likely be dwarfed by the file operations happening inside of tracing-appender. What do you think?

davidbarsky avatar Jul 15 '22 13:07 davidbarsky

The downside of this approach is that the use of a hard-coded offset does not handle daylight savings. I feel that if we're to support non-UTC timestamps inside of tracing-appender, we should use LocalTime to handle this correctly. While that is more expensive call than a UTF offset, it will likely be dwarfed by the file operations happening inside of tracing-appender. What do you think?

我认为,具体偏移时间应该由编码者自主控制,是否需要将偏移时间编写的更灵活一些应该由编码者决定,我们可以提供设置方法。当然这只是我个人的想法。

hubertshelley avatar Jul 18 '22 05:07 hubertshelley