Merge branch 'master' into BAEL-20856-move-spring-boot-autoconfiguration
This commit is contained in:
		
						commit
						63a0600bdf
					
				| @ -4,6 +4,7 @@ import org.junit.Test; | |||||||
| 
 | 
 | ||||||
| import java.time.OffsetDateTime; | import java.time.OffsetDateTime; | ||||||
| import java.util.Date; | import java.util.Date; | ||||||
|  | import java.util.TimeZone; | ||||||
| 
 | 
 | ||||||
| import static org.junit.Assert.assertEquals; | import static org.junit.Assert.assertEquals; | ||||||
| import static org.junit.Assert.assertTrue; | import static org.junit.Assert.assertTrue; | ||||||
| @ -18,12 +19,19 @@ public class ConvertToOffsetDateTimeUnitTest { | |||||||
| 
 | 
 | ||||||
|     @Test |     @Test | ||||||
|     public void givenDate_whenHasOffset_thenConvertWithOffset() { |     public void givenDate_whenHasOffset_thenConvertWithOffset() { | ||||||
|  |         TimeZone prevTimezone = TimeZone.getDefault(); | ||||||
|  |         TimeZone.setDefault(TimeZone.getTimeZone("UTC")); | ||||||
|  | 
 | ||||||
|         Date date = new Date(); |         Date date = new Date(); | ||||||
|         date.setHours(6); |         date.setHours(6); | ||||||
|         date.setMinutes(30); |         date.setMinutes(30); | ||||||
|  | 
 | ||||||
|         OffsetDateTime odt = ConvertToOffsetDateTime.convert(date, 3, 30); |         OffsetDateTime odt = ConvertToOffsetDateTime.convert(date, 3, 30); | ||||||
|         assertEquals(10, odt.getHour()); |         assertEquals(10, odt.getHour()); | ||||||
|         assertEquals(0, odt.getMinute()); |         assertEquals(0, odt.getMinute()); | ||||||
|  | 
 | ||||||
|  |         // Reset the timezone to its original value to prevent side effects | ||||||
|  |         TimeZone.setDefault(prevTimezone); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								pom.xml
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								pom.xml
									
									
									
									
									
								
							| @ -642,7 +642,6 @@ | |||||||
|                 <module>spring-boot-modules</module> |                 <module>spring-boot-modules</module> | ||||||
|                 <module>spring-boot-admin</module> |                 <module>spring-boot-admin</module> | ||||||
|                 <module>spring-boot-angular</module> |                 <module>spring-boot-angular</module> | ||||||
|                 <module>spring-boot-artifacts</module> |  | ||||||
|                 <module>spring-boot-bootstrap</module> |                 <module>spring-boot-bootstrap</module> | ||||||
|                 <module>spring-boot-camel</module> |                 <module>spring-boot-camel</module> | ||||||
|                 <!-- <module>spring-boot-cli</module> --> <!-- Not a maven project --> |                 <!-- <module>spring-boot-cli</module> --> <!-- Not a maven project --> | ||||||
| @ -1176,7 +1175,6 @@ | |||||||
|                 <module>spring-boot-modules</module> |                 <module>spring-boot-modules</module> | ||||||
|                 <module>spring-boot-admin</module> |                 <module>spring-boot-admin</module> | ||||||
|                 <module>spring-boot-angular</module> |                 <module>spring-boot-angular</module> | ||||||
|                 <module>spring-boot-artifacts</module> |  | ||||||
|                 <module>spring-boot-bootstrap</module> |                 <module>spring-boot-bootstrap</module> | ||||||
|                 <module>spring-boot-camel</module> |                 <module>spring-boot-camel</module> | ||||||
|                 <!-- <module>spring-boot-cli</module> --> <!-- Not a maven project --> |                 <!-- <module>spring-boot-cli</module> --> <!-- Not a maven project --> | ||||||
|  | |||||||
| @ -14,6 +14,7 @@ | |||||||
|     </parent> |     </parent> | ||||||
| 
 | 
 | ||||||
|     <modules> |     <modules> | ||||||
|  |         <module>spring-boot-artifacts</module> | ||||||
|         <module>spring-boot-autoconfiguration</module> |         <module>spring-boot-autoconfiguration</module> | ||||||
|         <module>spring-boot-data</module> |         <module>spring-boot-data</module> | ||||||
|         <module>spring-boot-mvc-birt</module> |         <module>spring-boot-mvc-birt</module> | ||||||
|  | |||||||
| @ -11,7 +11,7 @@ | |||||||
|         <groupId>com.baeldung</groupId> |         <groupId>com.baeldung</groupId> | ||||||
|         <artifactId>parent-boot-2</artifactId> |         <artifactId>parent-boot-2</artifactId> | ||||||
|         <version>0.0.1-SNAPSHOT</version> |         <version>0.0.1-SNAPSHOT</version> | ||||||
|         <relativePath>../parent-boot-2</relativePath> |         <relativePath>../../parent-boot-2</relativePath> | ||||||
|     </parent> |     </parent> | ||||||
| 
 | 
 | ||||||
|     <dependencies> |     <dependencies> | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user