Skip to content

Commit 85b84e2

Browse files
committed
Merge branch 'master' of https://github.com/dotnetcore/SmartSql
2 parents 70f6f38 + 573f142 commit 85b84e2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/SmartSql/IdGenerator/SnowflakeIdState.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ public SnowflakeIdState(long id, ISnowflakeId idGen)
2424
}
2525

2626
UtcTime = _idGen.EpochTime.AddMilliseconds((Id >> _idGen.TimestampShift) & _idGen.TimestampMask);
27-
var sequenceFormat = $"D{MachineIdLength}";
28-
var machineIdFormat = $"D{SequenceLength}";
27+
var machineIdFormat = $"D{MachineIdLength}";
28+
var sequenceFormat = $"D{SequenceLength}";
2929
IdString =
30-
$"{UtcTime.ToString(TIME_FORMAT)}{MachineId.ToString(sequenceFormat)}{Sequence.ToString(machineIdFormat)}";
30+
$"{UtcTime.ToString(TIME_FORMAT)}{MachineId.ToString(machineIdFormat)}{Sequence.ToString(sequenceFormat)}";
3131
}
3232

3333
public SnowflakeIdState(String idString, ISnowflakeId idGen)

0 commit comments

Comments
 (0)