protected Map<QName, String> getCustomProperties(final DavResource resource, final Long modified) { return Collections.singletonMap(LAST_MODIFIED_WIN32_CUSTOM_NAMESPACE, new RFC1123DateFormatter().format(modified, TimeZone.getTimeZone("GMT"))); } }
protected Map<QName, String> getCustomProperties(final DavResource resource, final Long modified) { final HashMap<QName, String> props = new HashMap<>(); if(resource.getModified() != null) { props.put(LAST_MODIFIED_SERVER_CUSTOM_NAMESPACE, new RFC1123DateFormatter().format(resource.getModified(), TimeZone.getTimeZone("UTC"))); } props.put(LAST_MODIFIED_CUSTOM_NAMESPACE, new RFC1123DateFormatter().format(modified, TimeZone.getTimeZone("UTC"))); return props; } }
@Action public void metadataAddExpiresClicked(ID sender) { final Calendar time = Calendar.getInstance(TimeZone.getTimeZone("UTC")); time.add(Calendar.SECOND, preferences.getInteger("s3.cache.seconds")); this.addMetadataItem("Expires", new RFC1123DateFormatter().format(time.getTime(), TimeZone.getTimeZone("UTC"))); }