Skip to content

Commit

Permalink
UTC取得に修正
Browse files Browse the repository at this point in the history
  • Loading branch information
r-koubou committed Nov 6, 2023
1 parent 750201b commit 3235e53
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ public static KeySwitch CreateTemplate(
IMidiNoteOnFactory midiNoteOnFactory,
IMidiControlChangeFactory midiControlChangeFactory,
IMidiProgramChangeFactory midiProgramChangeFactory )
=> factory.Create(
{
var now = UtcDateTime.NowAsDateTime;
return factory.Create(
Guid.NewGuid(),
"Author",
"Description",
UtcDateTime.NowAsDateTime,
UtcDateTime.NowAsDateTime,
now,
now,
"Developer Name",
"Product name",
"Instrument name",
Expand Down Expand Up @@ -65,5 +67,6 @@ public static KeySwitch CreateTemplate(
{ "extra2 key", "extra2 value" },
}
);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ public KeySwitch Create(
IEnumerable<Articulation> articulations,
IReadOnlyDictionary<string, string> extraData )
{
created = DateTimeHelper.ToUtc( created );
lastUpdated = DateTimeHelper.ToUtc( lastUpdated );

return new KeySwitch(
new KeySwitchId( id ),
new Author( author ),
Expand All @@ -57,4 +54,4 @@ public KeySwitch Create(
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;

using KeySwitchManager.Commons.Data;
using KeySwitchManager.Commons.Data.Extensions;
using KeySwitchManager.Domain.KeySwitches.Models;
using KeySwitchManager.Domain.KeySwitches.Models.Aggregations;
using KeySwitchManager.Domain.KeySwitches.Models.Factory;
Expand Down Expand Up @@ -33,7 +34,7 @@ public IReadOnlyCollection<KeySwitch> Translate( Workbook source )

private KeySwitch TranslateWorkSheet( Worksheet sheet, ICollection<Guid> parsedGuidList )
{
var now = DateTimeHelper.NowUtc();
var now = UtcDateTime.NowAsDateTime;
var articulations = new List<Articulation>();
var extraData = new Dictionary<string, string>();

Expand Down Expand Up @@ -143,4 +144,4 @@ private IReadOnlyCollection<MidiProgramChange> TranslateMidiProgramChangeMapping
}

}
}
}

0 comments on commit 3235e53

Please sign in to comment.