Skip to content

Commit d2a195f

Browse files
committed
Fix #74
1 parent 57acafb commit d2a195f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

MaterialDesignThemes.Wpf/Clock.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ private void ClockItemDragDeltaHandler(object sender, DragDeltaEventArgs dragDel
269269
if (angle < 0) angle += 2 * Math.PI;
270270

271271
var time = DisplayMode == ClockDisplayMode.Hours
272-
? new DateTime(Time.Year, Time.Month, Time.Day, (int)Math.Round(6 * angle / Math.PI, MidpointRounding.AwayFromZero) % 12, Time.Minute, Time.Second)
272+
? new DateTime(Time.Year, Time.Month, Time.Day, (int)Math.Round(6 * angle / Math.PI, MidpointRounding.AwayFromZero) % 12 + (IsPostMeridiem? 12 : 0), Time.Minute, Time.Second)
273273
: new DateTime(Time.Year, Time.Month, Time.Day, Time.Hour, (int)Math.Round(30 * angle / Math.PI, MidpointRounding.AwayFromZero) % 60, Time.Second);
274274

275275
SetCurrentValue(TimeProperty, time);

0 commit comments

Comments
 (0)