Skip to content

Commit

Permalink
Merge pull request #1374 from sillsdev/fix-build-date
Browse files Browse the repository at this point in the history
Changed build date in SILAboutBox to be computed using the last write time
  • Loading branch information
tombogle authored Jan 27, 2025
2 parents b341666 + f9f1024 commit a4215d3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Changed
- [SIL.TestUtilities] Made FluentAssertXml classes use "Assert.That" so they can work in clients that use NUnit 4.
-
### Fixed
- [SIL.Windows.Forms] Changed build date in SILAboutBox to be computed using the last write time instead of creation time.

## [15.0.0] - 2025-01-06

Expand Down
8 changes: 5 additions & 3 deletions SIL.Windows.Forms/Miscellaneous/SILAboutBox.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2016-2024, SIL Global
// Copyright (c) 2016-2025, SIL Global
// This software is licensed under the MIT License (http://opensource.org/licenses/MIT)

using System;
Expand Down Expand Up @@ -38,7 +38,7 @@ public partial class SILAboutBox : Form
/// parts of the version number, i.e. "MajorVersion.MinorVersion.Build",
/// <c>true</c> to display the full version number as found in Application.ProductVersion.
/// Passing <c>true</c> is useful if you want to display, for example, the git revision of
/// the build. Typically this would be set in the AssemblyInformationalVersion.</param>
/// the build. Typically, this would be set in the AssemblyInformationalVersion.</param>
/// <param name="logoVariant">If specified, allows caller to indicate particular SIL logo
/// variant to display. By default, a variant is chosen at random.</param>
public SILAboutBox(string pathToAboutBoxHtml, bool useFullVersionNumber = false,
Expand Down Expand Up @@ -161,7 +161,9 @@ private string GetBuiltOnDate()

// Use UTC for calculation of build-on-date so that we get the same date regardless
// of timezone setting.
return string.Format(LocalizationManager.GetString("AboutDialog.BuiltOnDate", "Built on {0}", "{0} is the date the application was built"), fi.CreationTimeUtc.ToString("dd-MMM-yyyy"));
return string.Format(LocalizationManager.GetString("AboutDialog.BuiltOnDate",
"Built on {0}", "{0} is the date the application was built"),
fi.LastWriteTimeUtc.ToString("dd-MMM-yyyy"));
}

private string GetShortVersionInfo()
Expand Down
2 changes: 1 addition & 1 deletion TestApps/SIL.Windows.Forms.TestApp/TestAppForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ private static void ShowSilAboutBox(XWebBrowser.BrowserType browserType, bool us
{
File.WriteAllText(tempfile.Path,
@"<html><head><meta charset='UTF-8' /></head><body>" +
@"<h3>Copyright 2024 <a href=""http://sil.org"">SIL Global</a></h3>" +
@"<h3>Copyright 2025 <a href=""http://sil.org"">SIL Global</a></h3>" +
@"<p>Testing the <b>about box</b></p><ul>#DependencyAcknowledgements#</ul></body></html>");
var uri = new Uri(tempfile.Path);
using (var dlg = new SILAboutBox(uri.AbsoluteUri, useFullVersionNumber))
Expand Down

0 comments on commit a4215d3

Please sign in to comment.