Skip to content

Commit

Permalink
🐛 fix(clock-animation-starter): Fix uts/localtime switch
Browse files Browse the repository at this point in the history
  • Loading branch information
esnya committed Jun 17, 2022
1 parent f11206d commit 3bc1754
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private void Start()
if (!clockAnimator) clockAnimator = GetComponentInParent<Animator>();

var layerId = clockAnimator.GetLayerIndex(layerName);;
var time = useUTC ? DateTime.Now : DateTime.UtcNow;
var time = useUTC ? DateTime.UtcNow : DateTime.Now;
var normalizedTime = Convert.ToSingle(time.TimeOfDay.TotalHours / 12.0 % 1.0);

clockAnimator.Play(stateName, layerId, normalizedTime);
Expand Down
Loading

0 comments on commit 3bc1754

Please sign in to comment.