You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ha...@apache.org on 2018/08/06 08:21:26 UTC
[royale-compiler] branch develop updated: Tests were broken for
timezones to the east of GMT
This is an automated email from the ASF dual-hosted git repository.
harbs pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
The following commit(s) were added to refs/heads/develop by this push:
new 743d1bb Tests were broken for timezones to the east of GMT
743d1bb is described below
commit 743d1bba17bcefc5fea425aeca38c7c1288fdcd7
Author: Harbs <ha...@in-tools.com>
AuthorDate: Mon Aug 6 11:21:18 2018 +0300
Tests were broken for timezones to the east of GMT
---
compiler/src/test/java/as/ASDateTests.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/compiler/src/test/java/as/ASDateTests.java b/compiler/src/test/java/as/ASDateTests.java
index 4054b87..dbaec9e 100644
--- a/compiler/src/test/java/as/ASDateTests.java
+++ b/compiler/src/test/java/as/ASDateTests.java
@@ -36,6 +36,8 @@ public class ASDateTests extends ASFeatureTestsBase
String offsetString = new Integer(tz.getOffset(new Date().getTime()) / 3600000).toString();
if (offsetString.length() == 2)
offsetString = offsetString.substring(0,1) + 0 + offsetString.substring(1, 2);
+ if(offsetString.charAt(0) != '-')
+ offsetString = "+" + offsetString;
offsetString = "GMT" + offsetString + "00";
if (!hasFlashPlayerGlobal)
offsetString = "GMT-0800";
@@ -146,7 +148,7 @@ public class ASDateTests extends ASFeatureTestsBase
};
String[] testCode = new String[]
{
- "var date : Date = new Date('Mon Dec 31 23:59:59 GMT-0800 2018');",
+ setTimeZone("var date : Date = new Date('Mon Dec 31 23:59:59 TZ 2018');"),
"date.fullYear += 1;",
"assertEqual('date.fullYear', date.fullYear, 2019);",
};