Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It would be better if you can include the timezone info in log folder #15

Closed
chucklu opened this issue Apr 29, 2020 · 4 comments
Closed

Comments

@chucklu
Copy link

chucklu commented Apr 29, 2020

C:\Users\clu\AppData\Local\Temp\Fusion++\2020.04.29.07.47.14.7452\Default\Everything.exe
can be convert to
C:\Users\clu\AppData\Local\Temp\Fusion++\2020.04.29.15.47.14.7452+0800\Default\Everything.exe

private const string DATE_FORMAT = "yyyy.MM.dd.HH.mm.ss.ffffzzz";
var folder=DateTime.Now.ToString(DATE_FORMAT).Replace(":", string.Empty);
Path = System.IO.Path.Combine(TopLevelPath, folder);

The following parse datetime will not work. maybe write a custom method to parse the time.

	if (DateTime.TryParseExact(result, UTC_DATE_FORMAT, System.Globalization.CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.AssumeUniversal, out DateTime date))
				result = date.ToShortDateString() + " " + date.ToLongTimeString();
@awaescher
Copy link
Owner

Why do you want me to add the time zone to an UTC date?

@awaescher
Copy link
Owner

In addition, this one is not releated to #16 so I'm closing it.

@chucklu
Copy link
Author

chucklu commented May 19, 2020

@awaescher The problem is the time on personal computer is not the UTC time.
The standard behavior is record the time with timezone
log4net component can record log with timezone info

<conversionPattern value="[%d{dd MMM yyyy HH:mm:ss.fff**zzz**}{GMT}] [%5level] (%identity-%username) %message%newline" />

@awaescher
Copy link
Owner

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants