Java time getting out of sync

Java time getting out of sync

Recently, I am experiencing a very strange error which I am unable to reproduce locally. It happens on a server (CentOS) inside a Spring Boot application.

Recently, I am experiencing a very strange error which I am unable to reproduce locally. It happens on a server (CentOS) inside a Spring Boot application.

calling new Date() (java.util.Date) produces wrong time. And I am not talking about an hour difference due to different timezone. The datetime is off by X minutes. It seems that it is gradually starting to lack behind the current time.

When getting the current system clock time, it seems to be correct but the Java time is gradually increasing the difference (not by one minute every minute but slower). Almost like the JVM existed in some time bubble with different laws of time.

This issue starting happening accidentally today after a long run without any problems.

Could someone suggest what should I try to debug this issue? I am clueless and cannot replicate this issue locally (everything works on local machine).

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Spring Boot Tutorials - Spring Boot Full Course

Spring Boot Tutorials | Full Course - What is Spring? Spring Boot is an open source Java-based framework used to create a Micro Service. Spring Boot contains a comprehensive infrastructure support for developing a micro service and enables you to develop enterprise-ready applications that you can “just run”.

Spring Boot Tutorial For Beginner- Spring Boot Full Course

This "Spring Boot Tutorial For Beginner- Spring Boot Full Course" video will help you learn Spring Boot Framework from scratch with examples. This Spring Tutorial is ideal for both beginners as well as professionals who want to master the Spring Boot Framework

Full-stack Reactive Java with Spring Framework, Spring Boot and Project Reactor

Reactive programming offers Java developers a way to build message-driven, elastic, resilient, and responsive services...yet many Java developers don't know where to begin.