I tried to render the Instant value through BlockNode, but I found a phenomenon in which time and minutes were incorrectly replaced. It seems that the problem is caused by the absence of the Instant’s date pattern in liqp/filters/date/Parser.java.
In the following code, only YEAR, MONTH_OF_YEAR, DAY_OF_MONTH, and SECOND_OF_MINUTE are True in isSupported(), while HOUR_OF_DAY and MINUTE_OF_HOUR are False.
TemporalField[] copyThese = new TemporalField[]{
YEAR,
MONTH_OF_YEAR,
DAY_OF_MONTH,
HOUR_OF_DAY,
MINUTE_OF_HOUR,
SECOND_OF_MINUTE,
NANO_OF_SECOND
};
for (TemporalField tf: copyThese) {
if (temporalAccessor.isSupported(tf)) {
now = now.with(tf, temporalAccessor.get(tf));
}
}
Perhaps it will be solved by adding the following patterns to datePatterns. (If there's a better way, that's good.)
When the above datePatterns were added, the Instant value was properly rendered. (tested Kotlin Code)
The following is the value that appears when instant is debugged in IntelliJ.
val beginDateInstant = Instant.ofEpochSecond(1704898800)
It is possible that I am not familiar with the usage. If there's right way in this case, would appreciate let me know.
Temporarily convert Instant and LocalDateTime into String and use it.
I tried to render the Instant value through BlockNode, but I found a phenomenon in which time and minutes were incorrectly replaced. It seems that the problem is caused by the absence of the Instant’s date pattern in liqp/filters/date/Parser.java.
In the following code, only YEAR, MONTH_OF_YEAR, DAY_OF_MONTH, and SECOND_OF_MINUTE are True in isSupported(), while HOUR_OF_DAY and MINUTE_OF_HOUR are False.
Perhaps it will be solved by adding the following patterns to datePatterns. (If there's a better way, that's good.)
When the above datePatterns were added, the Instant value was properly rendered. (tested Kotlin Code)
The following is the value that appears when instant is debugged in IntelliJ.
It is possible that I am not familiar with the usage. If there's right way in this case, would appreciate let me know. Temporarily convert Instant and LocalDateTime into String and use it.