tracing
tracing copied to clipboard
appender: Add offset time setting
Motivation
Solution
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?
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?
我认为,具体偏移时间应该由编码者自主控制,是否需要将偏移时间编写的更灵活一些应该由编码者决定,我们可以提供设置方法。当然这只是我个人的想法。