getHourOfDay(), getMinuteOfHour(), getSecondOfMinute()); date.setTime(date.getTime() + getMillisOfSecond()); LocalDateTime check = LocalDateTime.fromDateFields(date); if (check.isBefore(this)) { check = LocalDateTime.fromDateFields(date); check = LocalDateTime.fromDateFields(date); check = LocalDateTime.fromDateFields(earlier); if (check.equals(this)) { date = earlier;
@Override public LocalDateTime convert(Date in, Context context) throws Exception { if (in == null) return null; return LocalDateTime.fromDateFields(in); } }
public static LocalDateTime sqlTimestampToJodaLocalDateTime(Timestamp timestamp) { return LocalDateTime.fromDateFields(timestamp); }
@Nonnull @Override public LocalDateTime convert(java.time.Instant source) { return LocalDateTime.fromDateFields(new Date(source.toEpochMilli())); } }
/** * Creates a new LocalDateTime-valued OData property with {@link EdmSimpleType#DATETIME} * * @param name the property name * @param value the property value * @return a new OData property instance */ public static OProperty<LocalDateTime> datetime(String name, Date value) { return new Impl<LocalDateTime>(name, EdmSimpleType.DATETIME, value != null ? LocalDateTime.fromDateFields(value) : null); }
/** * Creates a new LocalDateTime-valued OData property with {@link EdmSimpleType#DATETIME} * * @param name the property name * @param value the property value * @return a new OData property instance */ public static OProperty<LocalDateTime> datetime(String name, Date value) { return new Impl<LocalDateTime>(name, EdmSimpleType.DATETIME, value != null ? LocalDateTime.fromDateFields(value) : null); }
@Nonnull @Override public LocalDateTime convert(java.time.LocalDateTime source) { return LocalDateTime.fromDateFields(Jsr310Converters.LocalDateTimeToDateConverter.INSTANCE.convert(source)); } }
@Contract("null -> null; !null -> !null") public static @Nullable LocalDateTime utilDateToJodaDateTime(final @Nullable Date d) { if (d == null) { return null; } return LocalDateTime.fromDateFields(d); }
/** * Creates a new LocalDateTime-valued OData property with {@link EdmSimpleType#DATETIME} * * @param name the property name * @param value the property value * @return a new OData property instance */ public static OProperty<LocalDateTime> datetime(String name, Date value) { return new Impl<LocalDateTime>(name, EdmSimpleType.DATETIME, value != null ? LocalDateTime.fromDateFields(value) : null); }
private FileInfo(File parent, File file) { this.isDir = file.isDirectory(); this.context = null == parent ? "/" : parent.getAbsolutePath(); this.path = printPath(file); this.size = printSize(file); this.timestamp = LocalDateTime.fromDateFields(new Date(file.lastModified())); this.hidden = file.isHidden(); }
public IEntry( Option<String> pkgClass, RelativePath path, File realPath ) { super( pkgClass, Option.<Boolean>none(), regularFile( path, fromDateFields( new Date( realPath.lastModified() ) ), realPath.length(), FileAttributes.EMPTY ) ); this.realPath = realPath; }
private FileInfo(File parent, File file) { this.isDir = file.isDirectory(); this.context = null == parent ? "/" : parent.getAbsolutePath(); this.path = printPath(file); this.size = printSize(file); this.timestamp = LocalDateTime.fromDateFields(new Date(file.lastModified())); this.hidden = file.isHidden(); }
private LocalDateTime findTimeStamp(WebHookExecutionStats webHookExecutionStats) { if (webHookExecutionStats.getRequestCompletedTimeStamp() != null) { return LocalDateTime.fromDateFields(webHookExecutionStats.getRequestCompletedTimeStamp()); } else { return LocalDateTime.fromDateFields(webHookExecutionStats.getInitTimeStamp()); } }
public IEntry( Option<String> pkgClass, RelativePath path, File realPath ) { super( pkgClass, Option.<Boolean>none(), regularFile( path, fromDateFields( new Date( realPath.lastModified() ) ), realPath.length(), Option.<FileAttributes>none() ) ); this.realPath = realPath; }
public IEntry( Option<String> pkgClass, RelativePath path, File realPath ) { super( pkgClass, Option.<Boolean>none(), regularFile( path, fromDateFields( new Date( realPath.lastModified() ) ), realPath.length(), Option.<FileAttributes>none() ) ); this.realPath = realPath; }
public void beforeAssembly( Directory defaultDirectory ) { excludedSysPaths.add("/DEBIAN"); excludedSysPaths.add("/DEBIAN/conffiles"); Validate.validateNotNull( defaultDirectory ); Directory root = UnixFsObject.directory( BASE, fromDateFields( new Date( 0 ) ), EMPTY ); fileSystem = create( new PlainPackageFileSystemObject( root ), new PlainPackageFileSystemObject( defaultDirectory ) ); }
public Object nullSafeGet(ResultSet resultSet, String string) throws SQLException { Object timestamp = StandardBasicTypes.TIMESTAMP.nullSafeGet(resultSet, string); if (timestamp == null) { return null; } if (timestamp instanceof Date) { return LocalDateTime.fromDateFields((Date) timestamp); } else if (timestamp instanceof Calendar) { return LocalDateTime.fromCalendarFields((Calendar) timestamp); } return new LocalDateTime(timestamp); }
public Object nullSafeGet(ResultSet resultSet, String string) throws SQLException { Object timestamp = StandardBasicTypes.TIMESTAMP.nullSafeGet(resultSet, string); if (timestamp == null) { return null; } if (timestamp instanceof Date) { return LocalDateTime.fromDateFields((Date) timestamp); } else if (timestamp instanceof Calendar) { return LocalDateTime.fromCalendarFields((Calendar) timestamp); } return new LocalDateTime(timestamp); }
public void beforeAssembly( Directory defaultDirectory ) { Validate.validateNotNull( defaultDirectory ); Directory root = UnixFsObject.directory( BASE, fromDateFields( new Date( 0 ) ), EMPTY ); fileSystem = create( new PlainPackageFileSystemObject( root ), new PlainPackageFileSystemObject( defaultDirectory ) ); }
private static List<UnixFsObject> process( InputStream is ) throws IOException { TarInputStream tarInputStream = new TarInputStream( is ); TarEntry entry = tarInputStream.getNextEntry(); List<UnixFsObject> objects = new ArrayList<UnixFsObject>(); while ( entry != null ) { Option<UnixFileMode> mode = some( UnixFileMode.fromInt( entry.getMode() ) ); FileAttributes attributes = new FileAttributes( some( entry.getUserName() ), some( entry.getGroupName() ), mode ); RelativePath path = relativePath( entry.getName() ); LocalDateTime lastModified = LocalDateTime.fromDateFields( entry.getModTime() ); objects.add( entry.isDirectory() ? directory( path, lastModified, attributes ) : regularFile( path, lastModified, entry.getSize(), some( attributes ) )); entry = tarInputStream.getNextEntry(); } return objects; } }