[
https://issues.apache.org/jira/browse/LOG4NET-380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13671564#comment-13671564
]
Steve Ziuchkovski commented on LOG4NET-380:
-------------------------------------------
Both clocks are synched.
A LoggingEvent is created on Windows at 0800 Local/System time (1300 UTC), and
an Appender on Windows writes the LoggingEvent to a file using %date conversion
pattern of a LogFileAppender. The text written to the file is the equivalent of
0800. The same logging event goes to another Appender I wrote that appends to a
collection (CollectionAppender), and the TimeStamp.Kind property is local.
A LoggingEvent is created on Mono at the exact same time, 0800 Local/System
time (1300 UTC). It is sent to the Windows machine using a RemoteAppender. The
Windows machine receives it using a remoting serer, and then uses the exact
same LogFileAppender to write the LoggingEvent to the same file. The text
written to the file is the equivalent of 1300. It also goes to my
CollectionAppender, and the LoggingEvent's TimeStamp.Kind property is local.
1300 is not local, it's UTC. This is the problem.
> LoggingEvents received from RemoteAppender are UTC, but TimeStamp.Kind is
> "Local" and not "Utc"
> -----------------------------------------------------------------------------------------------
>
> Key: LOG4NET-380
> URL: https://issues.apache.org/jira/browse/LOG4NET-380
> Project: Log4net
> Issue Type: Bug
> Components: Appenders
> Affects Versions: 1.2.11
> Environment: .NET 4 application on RaspberryPi (Arch Linux) with Mono
> 2.10.9, logging with RemoteAppender to an application on Windows 7, which
> uses a custom appender to add the received LoggingEvents to a collection.
> Reporter: Steve Ziuchkovski
> Labels: remote, timestamp, timezone
>
> The timestamps from RemoteAppender are UTC, but the TimeStamp.Kind property
> is "Local".
> Both the Windows and Linux machines have their system time set to local time.
> The LoggingEvent TimeStamps that are received from the Windows machine (not
> going through RemoteAppender) contain local timestamps, and the
> LoggingEvent.TimeStamp.Kind is "Local".
> The LoggingEvent TimeSTamps that are received from the Linux machine (going
> through RemoteAppender) contain UTC timestamps, but the TimeStamp.Kind is
> "Local", not "Utc".
> If the Kind property was UTC, I could adjust the timestamps from both log
> event sources to match (both UTC/both Local). Unfortunately, I cannot tell
> the difference using just the TimeStamp field itself.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira