You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by GitBox <gi...@apache.org> on 2019/10/30 06:35:23 UTC

[GitHub] [wicket] solomax commented on a change in pull request #396: Wicket 6712 js time zone

solomax commented on a change in pull request #396: Wicket 6712 js time zone
URL: https://github.com/apache/wicket/pull/396#discussion_r340448427
 
 

 ##########
 File path: wicket-core/src/test/java/org/apache/wicket/protocol/http/ClientPropertiesTest.java
 ##########
 @@ -149,4 +149,32 @@ void timezoneAET()
 
 		assertEquals(TimeZone.getTimeZone("AET"), props.getTimeZone());
 	}
+
+	/**
+	 * jsTimeZone "positive" test
+	 */
+	@Test
+	void timezoneJsPositive()
+	{
+		ClientProperties props = new ClientProperties();
+		props.setUtcOffset("11");
+		props.setUtcDSTOffset("10");
+		props.setJsTimeZone("Asia/Novosibirsk");
+
+		assertEquals(TimeZone.getTimeZone("Asia/Novosibirsk"), props.getTimeZone());
+	}
+
+	/**
+	 * jsTimeZone "negative" test
+	 */
+	@Test
+	void timezoneJsNegative()
+	{
+		ClientProperties props = new ClientProperties();
+		props.setUtcOffset("11");
+		props.setUtcDSTOffset("10");
+		props.setJsTimeZone("aaa");
+
+		assertEquals(TimeZone.getTimeZone("AET"), props.getTimeZone());
 
 Review comment:
   `AET` === `Australian Eastern Standard Time` taken from the previous test
   This is the time zone determined for offset specified

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services