Baoyi Chen
Baoyi Chen
hi all ``` SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd-HH:mm:ss"); format.setTimeZone(TimeZone.getTimeZone("UTC")); Instant instant = format.parse("19981231-23:59:60").toInstant(); System.out.println("instant = " + instant); ``` above code could work because by default `SimpleDateFormat.setLenient(true);` leap second should...
for example : previous time : 19981231-23:59:59.555555 current time with leap second : 19981231-23:59:60.444444 (I don't know this time will appare or not) if we minus 1 second the time...
a way to fix above case is we cache previous nanos and if current time with leap seconds, we set nanos = max(previous nanos, current nanos) pseudo code like following...
Benchmark ``` import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.concurrent.TimeUnit; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.Fork; import org.openjdk.jmh.annotations.Measurement; import org.openjdk.jmh.annotations.Scope; import org.openjdk.jmh.annotations.State; import org.openjdk.jmh.annotations.Warmup; import org.openjdk.jmh.runner.Runner; import org.openjdk.jmh.runner.options.Options; import org.openjdk.jmh.runner.options.OptionsBuilder; /** * @author Baoyi...
hi @chrjohn or we could just optimize convertToLocalDateTime method and ignore leap second problem. one PR fix one thing? WDYT?
hi refer to [PR529](https://github.com/quickfix-j/quickfixj/pull/529)
@chrjohn 2 commits on one PR, is that OK?
@ian-axelrod hi redis-replicator-3.0.1 support from redis-2.6 to redis-5.0-GA, also include redis 3.2.6
有可重现的代码吗? 和jdk版本没关系。用的redis-replicator版本是多少? dump内存分析一下,有分析结果可以给我截图
see [RESP protocol spec](https://redis.io/docs/reference/protocol-spec/)