Skip to content

Commit

Permalink
Change DateTime Format for loot logger export
Browse files Browse the repository at this point in the history
  • Loading branch information
Triky313 committed Jun 29, 2022
1 parent 966f80d commit 1e26e1d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/StatisticsAnalysisTool/Models/LootLoggerObject.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using StatisticsAnalysisTool.Common;
using System;
using System;
using System.Globalization;
using StatisticsAnalysisTool.Common;

namespace StatisticsAnalysisTool.Models.NetworkModel
namespace StatisticsAnalysisTool.Models
{
public class LootLoggerObject
{
Expand All @@ -16,15 +16,15 @@ public LootLoggerObject()
public int Quantity { get; set; }
public string BodyName { get; set; }
public string LooterName { get; set; }
public string CsvOutput => $"{UtcPickupTime.ToString("MM/dd/yyyy H:mm:ss", CultureInfo.InvariantCulture)};{LooterName};{UniqueName};{Quantity};{BodyName}";
public string CsvOutput => $"{UtcPickupTime.ToString("O", CultureInfo.InvariantCulture)};{LooterName};{UniqueName};{Quantity};{BodyName}";
public string CsvOutputWithRealItemName => GetCsvOutputStringWithRealItemName();

private string GetCsvOutputStringWithRealItemName()
{
var item = ItemController.GetItemByUniqueName(UniqueName);
var itemName = (string.IsNullOrEmpty(item?.LocalizedName)) ? UniqueName : item.LocalizedName;

return $"{UtcPickupTime.ToString("MM/dd/yyyy H:mm:ss", CultureInfo.InvariantCulture)};{LooterName};{itemName.ToString(CultureInfo.InvariantCulture)};{Quantity};{BodyName}";
return $"{UtcPickupTime.ToString("O", CultureInfo.InvariantCulture)};{LooterName};{itemName.ToString(CultureInfo.InvariantCulture)};{Quantity};{BodyName}";
}
}
}

0 comments on commit 1e26e1d

Please sign in to comment.