mirror of
https://github.com/carm-outsource/TimeReward.git
synced 2026-06-04 15:28:16 +08:00
fix(time): 尝试修复在线时间计算错误的问题
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package cc.carm.plugin.tests;
|
||||
|
||||
import cc.carm.plugin.timereward.data.IntervalType;
|
||||
import cc.carm.plugin.timereward.data.TimeRecord;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
public class IntervalTest {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
|
||||
System.out.println(IntervalType.DAILY.calculate(
|
||||
new TimeRecord(LocalDate.now(), 100, 200, 300, 400),
|
||||
LocalDateTime.now()
|
||||
).getSeconds());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user