diff --git a/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs b/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs index c13aa9df44..7446de1519 100755 --- a/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs +++ b/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs @@ -3638,7 +3638,9 @@ namespace MaaWpfGui.ViewModels.UI private static readonly DateTime _buildDateTime = Assembly.GetExecutingAssembly().GetCustomAttribute()?.BuildDateTime ?? DateTime.MinValue; - public DateTime BuildDateTime { get; } = _buildDateTime; + public static DateTime BuildDateTime => _buildDateTime.ToLocalTime(); + + public static string BuildDateTimeLong => BuildDateTime.ToString("yyyy-MM-dd HH:mm"); private static (DateTime DateTime, string VersionName) _resourceInfo = GetResourceVersionByClientType(ConfigurationHelper.GetValue(ConfigurationKeys.ClientType, string.Empty)); @@ -3661,6 +3663,8 @@ namespace MaaWpfGui.ViewModels.UI set => SetAndNotify(ref _resourceDateTime, value); } + public string ResourceDateTimeLong => ResourceDateTime.ToString("yyyy-MM-dd HH:mm"); + private static (DateTime DateTime, string VersionName) GetResourceVersionByClientType(string clientType) { const string OfficialClientType = "Official"; @@ -4629,7 +4633,7 @@ namespace MaaWpfGui.ViewModels.UI ? LocalizationHelper.DefaultLanguage switch { "en-us" => $" - {ResourceDateTime:dd/MM} {ResourceVersion}", - _ => $" - {ResourceVersion}{ResourceDateTime:#ddMM}", + _ => $" - {ResourceVersion}{ResourceDateTime:#MMdd}", } : string.Empty; rvm.WindowTitle = $"{prefix}MAA{currentConfiguration} - {CoreVersion}{resourceVersion}{connectConfigName}{connectAddress}{clientName}"; diff --git a/src/MaaWpfGui/Views/UserControl/VersionUpdateSettingsUserControl.xaml b/src/MaaWpfGui/Views/UserControl/VersionUpdateSettingsUserControl.xaml index f1782eb032..383da37443 100755 --- a/src/MaaWpfGui/Views/UserControl/VersionUpdateSettingsUserControl.xaml +++ b/src/MaaWpfGui/Views/UserControl/VersionUpdateSettingsUserControl.xaml @@ -126,9 +126,9 @@ Margin="0,5" HorizontalAlignment="Center" VerticalAlignment="Center" - hc:FloatingBlock.Content="{Binding ResourceDateTime}" + hc:FloatingBlock.Content="{Binding ResourceDateTimeLong}" PreviewMouseDown="ResourceVersionClick" - Status="{Binding ResourceDateTime, Mode=OneWay}" + Status="{Binding ResourceDateTimeLong, Mode=OneWay}" Subject="资源日期" Color="#6969AA" /> @@ -211,9 +211,9 @@ Margin="0,5" HorizontalAlignment="Center" VerticalAlignment="Center" - hc:FloatingBlock.Content="{Binding BuildDateTime}" + hc:FloatingBlock.Content="{Binding BuildDateTimeLong}" PreviewMouseDown="CoreVersionClick" - Status="{Binding BuildDateTime, Mode=OneWay}" + Status="{Binding BuildDateTimeLong, Mode=OneWay}" Subject="构建日期" Color="#6969AA" />