Browse Source

Merge pull request #4122 from yu0A/master

Fix timestamps in log TextBox
pull/4144/head
2dust 1 year ago committed by GitHub
parent
commit
9eb4d90cd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      v2rayN/v2rayN/Handler/ConfigHandler.cs
  2. 4
      v2rayN/v2rayN/Handler/CoreHandler.cs
  3. 2
      v2rayN/v2rayN/Handler/NoticeHandler.cs

2
v2rayN/v2rayN/Handler/ConfigHandler.cs

@ -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);

4
v2rayN/v2rayN/Handler/CoreHandler.cs

@ -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
{

2
v2rayN/v2rayN/Handler/NoticeHandler.cs

@ -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");
}
}

Loading…
Cancel
Save