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

com.transferwise.tasks.utils.TimeUtils Maven / Gradle / Ivy

The newest version!
package com.transferwise.tasks.utils;

import java.sql.Timestamp;
import java.time.ZoneId;
import java.time.ZonedDateTime;

public final class TimeUtils {

  private TimeUtils() {
    throw new AssertionError();
  }

  public static ZonedDateTime toZonedDateTime(Timestamp timestamp) {
    if (timestamp == null) {
      return null;
    }
    return ZonedDateTime.ofInstant(timestamp.toInstant(), ZoneId.systemDefault());
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy