-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
8, 11
-
x86_64
-
os_x
ADDITIONAL SYSTEM INFORMATION :
/ macOS High Sierra v.10.13.5 / Java v.1.8.0_162-b12
A DESCRIPTION OF THE PROBLEM :
- If I modify the time of my computer and I set a minor time compared to the current time, the task stop working.
- If I modify the time of my computer and I set a major time compared to the current time, the task continue working as well.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Copy and paste the provided code and execute it
2. Now change the time of your computer with a minor time (for example from 18:19:26 to 15:19:26)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The software should continue printing numbers. This is a real problem when the daylight savings time arrives (summer/winter).
ACTUAL -
The program stops printing numbers
---------- BEGIN SOURCE ----------
Timer timer = new Timer();
TimerTask timertask = new TimerTask() {
@Override
public void run() {
System.out.println(ThreadLocalRandom.current().nextInt(0, 1000));
}
};
timer.schedule(timertask, 0, 1000);
---------- END SOURCE ----------
FREQUENCY : always
/ macOS High Sierra v.10.13.5 / Java v.1.8.0_162-b12
A DESCRIPTION OF THE PROBLEM :
- If I modify the time of my computer and I set a minor time compared to the current time, the task stop working.
- If I modify the time of my computer and I set a major time compared to the current time, the task continue working as well.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Copy and paste the provided code and execute it
2. Now change the time of your computer with a minor time (for example from 18:19:26 to 15:19:26)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The software should continue printing numbers. This is a real problem when the daylight savings time arrives (summer/winter).
ACTUAL -
The program stops printing numbers
---------- BEGIN SOURCE ----------
Timer timer = new Timer();
TimerTask timertask = new TimerTask() {
@Override
public void run() {
System.out.println(ThreadLocalRandom.current().nextInt(0, 1000));
}
};
timer.schedule(timertask, 0, 1000);
---------- END SOURCE ----------
FREQUENCY : always
- duplicates
-
JDK-4290274 (timer) java.util.Timer.scheduleAtFixedRate() fails if the system time is changed
-
- Open
-
- relates to
-
JDK-4290274 (timer) java.util.Timer.scheduleAtFixedRate() fails if the system time is changed
-
- Open
-