mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-29 17:25:32 +00:00
Fixed a bug where the last modiefied Date would be in UTC
This commit is contained in:
@@ -8,6 +8,8 @@ using HaWeb.XMLParser;
|
||||
public class XMLRootDocument {
|
||||
private XElement? _Element;
|
||||
private string? _filename;
|
||||
|
||||
[JsonIgnore]
|
||||
public IXMLRoot XMLRoot { get; private set; }
|
||||
|
||||
[JsonIgnore]
|
||||
@@ -29,7 +31,7 @@ public class XMLRootDocument {
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
public IFileInfo? File { get; private set; }
|
||||
public IFileInfo? File { get; set; }
|
||||
public string Prefix { get; private set; }
|
||||
public DateTime Date { get; private set; }
|
||||
|
||||
@@ -40,7 +42,10 @@ public class XMLRootDocument {
|
||||
public XMLRootDocument(IXMLRoot xmlRoot, IFileInfo file) {
|
||||
XMLRoot = xmlRoot;
|
||||
Prefix = xmlRoot.Prefix;
|
||||
SetFile(file);
|
||||
File = file;
|
||||
Date = file.LastModified.LocalDateTime;
|
||||
_filename = file.Name;
|
||||
_GenerateFieldsFromFilename(file.Name);
|
||||
}
|
||||
|
||||
// Entry point for XML upload reading
|
||||
@@ -52,12 +57,6 @@ public class XMLRootDocument {
|
||||
_Element = element;
|
||||
}
|
||||
|
||||
public void SetFile(IFileInfo file) {
|
||||
File = file;
|
||||
Date = file.LastModified.DateTime;
|
||||
_GenerateFieldsFromFilename(file.Name);
|
||||
}
|
||||
|
||||
private string _CreateFilename() {
|
||||
var filename = _removeInvalidChars(Prefix) + "_";
|
||||
if (!String.IsNullOrWhiteSpace(IdentificationString.Item1)) {
|
||||
|
||||
Reference in New Issue
Block a user