Merge pull request #4122 from yu0A/master

Fix timestamps in log TextBox
pull/4144/head
2dust 2023-07-30 11:08:14 +08:00 committed by GitHub
commit 9eb4d90cd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -594,7 +594,7 @@ namespace v2rayN.Handler
profileItem.configType = EConfigType.Custom;
if (Utils.IsNullOrEmpty(profileItem.remarks))
{
profileItem.remarks = $"import custom@{DateTime.Now.ToShortDateString()}";
profileItem.remarks = $"import custom@{DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss")}";
}
AddServerCommon(ref config, profileItem, true);

View File

@ -152,7 +152,7 @@ namespace v2rayN.Handler
private void CoreStart(ProfileItem node)
{
ShowMsg(false, string.Format(ResUI.StartService, DateTime.Now.ToString()));
ShowMsg(false, string.Format(ResUI.StartService, DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss")));
ECoreType coreType;
if (node.configType != EConfigType.Custom && _config.tunModeItem.enableTun)
@ -201,7 +201,7 @@ namespace v2rayN.Handler
private int CoreStartViaString(string configStr)
{
ShowMsg(false, string.Format(ResUI.StartService, DateTime.Now.ToString()));
ShowMsg(false, string.Format(ResUI.StartService, DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss")));
try
{

View File

@ -26,7 +26,7 @@ namespace v2rayN.Handler
public void SendMessage(string msg, bool time)
{
msg = $"{DateTime.Now} {msg}";
msg = $"{DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss")} {msg}";
MessageBus.Current.SendMessage(msg, "MsgView");
}
}