All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.defendev.common.time.ClockManager Maven / Gradle / Ivy

Go to download

Common utils purely based on JDK and no other dependencies. Only exception being for org.jetbrains:annotations for building stratgic Kotlin language compatibility.Another only-exception is Apache Commons Lang3.

The newest version!
package org.defendev.common.time;

import java.time.Clock;



public class ClockManager implements IClockManager {

    private Clock baseClock;

    public ClockManager(Clock baseClock) {
        this.baseClock = baseClock;
    }

    @Override
    public Clock clockUtc() {
        return baseClock.withZone(TimeUtil.ZULU_ZONE_ID);
    }

    @Override
    public Clock clockEuropeWarsaw() {
        return baseClock.withZone(TimeUtil.EUROPE_WARSAW_ZONE_ID);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy