OSDN Git Service

Changed Snapshot filename Time format
authormelchior <melchior@users.osdn.me>
Sun, 5 Jul 2020 22:35:47 +0000 (18:35 -0400)
committermelchior <melchior@users.osdn.me>
Sun, 5 Jul 2020 22:35:47 +0000 (18:35 -0400)
Automap/Subsystems/Snapshot.cs

index db66267..507bbec 100644 (file)
@@ -14,6 +14,7 @@ namespace Automap
        public class Snapshotter
        {
                public readonly int chunkSize;
+               private const string customTimeFormat = @"yyyy.MM.dd.HH.mm.ssZzz";
                public string fileName;
                public string chunkPath;
                public ColumnsMetadata cols;
@@ -26,7 +27,7 @@ namespace Automap
 
                public Snapshotter(string path, ColumnsMetadata cols, int chunkSize, int worldSeed)
                {
-                       this.fileName = Path.Combine(path, $"snapshot_{worldSeed}_{DateTime.UtcNow:s}.png");
+                       this.fileName = Path.Combine(path, $"snapshot_{worldSeed}_{DateTime.Now.ToString(customTimeFormat)}.png");
                        this.chunkPath = Path.Combine(path, AutomapSystem._chunkPath);
                        this.cols = cols;
                        this.chunkSize = chunkSize;