Skip to content

Instantly share code, notes, and snippets.

@luizrobertofreitas
Created June 5, 2017 15:06
Show Gist options
  • Save luizrobertofreitas/9fd82af9031619d30d9e7b9a58c10bf7 to your computer and use it in GitHub Desktop.
Save luizrobertofreitas/9fd82af9031619d30d9e7b9a58c10bf7 to your computer and use it in GitHub Desktop.
Setting UTC timezone spring-boot
@SpringBootApplication
public class Application {
@PostConstruct
void started() {
TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
}
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
@fpajaro
Copy link

fpajaro commented May 31, 2019

This causes my project to initialize 2 times.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment