Skip to content

Commit

Permalink
Merge pull request #260 from bcgov/develop/alex-timezone-fix
Browse files Browse the repository at this point in the history
Rollback timezone changes
  • Loading branch information
cditcher authored Apr 24, 2023
2 parents 1c7c671 + fc5bbf1 commit 2c29be8
Showing 1 changed file with 0 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
package ca.bc.gov.educ.api.program.config;

import com.fasterxml.jackson.databind.ObjectMapper;
import org.modelmapper.ModelMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.TimeZone;

@Configuration
@PropertySource("classpath:messages.properties")
public class GradProgramManagementConfig implements WebMvcConfigurer {
Expand All @@ -29,16 +25,5 @@ public ModelMapper modelMapper() {
return new ModelMapper();
}

@Bean
ObjectMapper jacksonObjectMapper(Jackson2ObjectMapperBuilder builder) {
return builder.createXmlMapper(false)
// Set timezone for JSON serialization as system timezone
.timeZone(TimeZone.getDefault())
.build();
}

@Bean
Jackson2ObjectMapperBuilder jackson2ObjectMapperBuilder() {
return new Jackson2ObjectMapperBuilder();
}
}

0 comments on commit 2c29be8

Please sign in to comment.