lichencai opened a new issue, #18128:
URL: https://github.com/apache/shardingsphere/issues/18128
## Question
I use interval algorithm by the properties like this
```
spring:
shardingsphere:
mode:
type: Standalone
repository:
type: File
props:
path: .shardingsphere
overwrite: true
datasource:
names: test-algorithm
test-algorithm:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.jdbc.Driver
url:
jdbc:mysql://localhost:3306/test_algorithm?useUnicode=true&characterEncoding=utf-8&rewriteBatchedStatements=true&serverTimezone=Asia/Shanghai
username: test
password: test
maxPoolSize: 100
minPoolSize: 5
rules:
sharding:
tables:
metic_text_record:
actual-data-nodes:
test-algorithm.metic_text_record$->{202201..203012}
table-strategy:
standard:
sharding-column: create_time
sharding-algorithm-name: myalgorithm
sharding-algorithms:
myalgorithm:
type: INTERVAL
props:
datetime-pattern: 'yyyy-MM-dd HH:mm:ss'
datetime-lower: '2022-01-01 00:00:00'
datetime-upper: '2023-12-01 00:00:00'
sharding-suffix-pattern: 'yyyyMM'
datetime-interval-amount: 1
datetime-interval-unit: 'months'
```
when the program use current time to format, it throws an error that
StringIndexOutOfBoundsException


why the current time's pattern like ‘2022-06-01’ but not '2022-06-01
16:00:00'
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail:
[email protected]
For queries about this service, please contact Infrastructure at:
[email protected]