1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-05 08:55:08 -05:00

XXX: org.apache.groovy.datetime.extensions.DateTimeExtensions is not registered for some reason in production (maybe a bug specific to Groovy 2.5.0)

This commit is contained in:
Reinhard Pointner 2018-08-19 12:37:32 +07:00
parent 5681d103fa
commit 720a535979
2 changed files with 2 additions and 6 deletions

View File

@ -1,3 +1,4 @@
moduleName=filebot-format moduleName=filebot-format
moduleVersion=2.5.0 moduleVersion=2.5.0
extensionClasses=net.filebot.cli.ScriptShellMethods,net.filebot.format.ExpressionFormatMethods extensionClasses=net.filebot.cli.ScriptShellMethods,net.filebot.format.ExpressionFormatMethods,org.apache.groovy.dateutil.extensions.DateUtilExtensions
staticExtensionClasses=org.apache.groovy.dateutil.extensions.DateUtilStaticExtensions

View File

@ -454,11 +454,6 @@ public class ScriptShellMethods {
return new JsonBuilder(object).toPrettyString(); return new JsonBuilder(object).toPrettyString();
} }
public static String format(Date self, String format) {
// XXX: org.apache.groovy.datetime.extensions.DateTimeExtensions is not registered for some reason in production (maybe a bug specific to Groovy 2.5.0)
return DateTimeFormatter.ofPattern(format, Locale.US).format(LocalDateTime.ofInstant(self.toInstant(), ZoneId.systemDefault()));
}
private ScriptShellMethods() { private ScriptShellMethods() {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }