Merge pull request #8592 from Alex-Vasile/utc-time-for-elvish-house-party

Make Elvish Time Party use UTC to keep time consistent between clients.
This commit is contained in:
Oleg Agafonov 2022-02-01 20:50:22 +04:00 committed by GitHub
commit c511de4f3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,6 +2,7 @@
package mage.cards.e;
import java.time.LocalTime;
import java.time.ZoneId;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
@ -50,7 +51,7 @@ class CurrentHourCount implements DynamicValue {
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
int hour = LocalTime.now().getHour();
int hour = LocalTime.now(ZoneId.of("UTC")).getHour();
// convert 24-hour value to 12-hour
if (hour > 12) {
hour -= 12;