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).

java spring-boot

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

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

What is new features in Javascript ES2020 ECMAScript 2020

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Random Password Generator Online

HTML Color Picker online | HEX Color Picker | RGB Color Picker

Java Spring Boot First App

Step by Step to your First Spring App

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.

Spring Boot Tutorial:Create Java Login Web App using Spring Security and Eclipse

Spring Boot Tutorial:Create Java Login Web App using Spring Security and Eclipse. A comprehensive step by step Java tutorial on creating Java login web app using Spring Boot, Web MVC, Security, Data, JDBC, Eclipse, and Spring Tools. In thi...