I have a spring boot application that uses spring-boot-starter-data-mongodb (2.7.7) to link with a local mongodb (v6). I have two different classes (with a LocalDateTime property) that maps two different collections; my problem is that the LocalDateTime property of the two classes are saved like they come from different timezone in the rispective mongo collection.
First class/collection
Class
@Document("CollectionOne")
public class ClassOne{
@Id
private String id;
private LocalDateTime dataChiamata;
Repo
public interface ClassOneRepo extends MongoRepository<ClassOne, String>{}
Saving
classOneRepo.save(obj1);
Obj1.dataChiamata ( from debugger )
MongoDb CollectionOne: exact same date of java

Second class/collection
Class
@Document("CollectionTwo")
public class ClassTwo{
@Id
private String id;
private List<LocalDateTime> giorniLetti;
Repo
public interface ClassTwoRepo extends MongoRepository<ClassTwo, String> {}
Saving
classTwoRepo .save(obj2);
Obj2.giorniLetti.get(0) (from debugger)

MondoDB CollectionTwo: one hour previous respect the java
I don't understand why the two dates are saved in a different way on the db although they are exactly the same java object; any suggestion?

