It is often recommended that datetimes be stored in the database in UTC and displayed to/received from users in their local timezone.
I am trying to implement this pattern in a Spring MVC / Spring Boot application but haven't been able to find documentation or examples. I'm using @DateTimeFormat annotations on the java.util.Date attributes of my @ModelAttribute form objects to make Spring parses/format dates.
Does Spring have built in support for this pattern? Something along the lines of Django's timezone-aware datetimes would be good. If not is there a not-too-cumbersome way of implementing it? Or is there a better way to handle/store datetimes in a Spring MVC application?
At the moment the application is UK-only so at present I only need support for BST (daylight savings), not different time zones for different users. However supporting users in different time zones is a potential future requirement.