[Event]
For example, in the case where the following source is executed,
===============================================
// 1948/5/3(Mon) 00:00:00
var dateOrigin = new Date(1948, 4, 3, 0, 0, 0);
var dateString_1 = DatabaseManager.dateToString(dateOrigin);
var dateString_2 = dateOrigin.toString();
Debug.browse(dateOrigin, dateString_1, dateString_2);
===============================================
the result will be as follows.
===============================================
1
Mon May 03 01:00:00 JDT 1948
Date
2
1948/05/03|01:00:00
String
3
Mon May 03 1948 00:00:00 GMT+0900 (JST)
String
===============================================
[Target versions]
AccelPlatform All updates
WebPlatform Ver.7.0
WebPlatform Ver.7.1
WebPlatform Ver.7.2
AppFramework Ver.7.0
AppFramework Ver.7.1
AppFramework Ver.7.2
[Answer]
Data transfer between JavaScript and Java and conversion of Data instance to a date string representation might fail when the script-developing model handles a date and time which represents daylight saving time.
Data transfer between JavaScript and Java and conversion of Data instance to a date string representation fail when Data instance of JavaScript satisfies all the following conditions (one-hour time lag occurs in date and time).
[Condition 1] Year is 1970 or earlier, or 2038 or later.
[Condition 2] Within the period of daylight-saving time in JavaVM’s default time zone where ApplicationRuntime operates.
* When the ApplicationRuntime’s time zone is JST (Japan time)
- A “year 1948, 1949, 1950, or 1951” and a “month in daylight saving time.”
* When the ApplicationRuntime’s time zone is other than JST
- A “year 1970 or earlier, or 2038 or later” and a ”month in daylight saving time.”
Note that this event occurs because of specifications of the script developing model engine (Rhino).
[Workaround]
By using a custom time zone for the jvm argument, you can specify a time zone that does not use daylight saving time.
If you want to operate the time zone as Japan time (JST), specify GMT + 0900.
-Duser.timezone=GMT+0900
When responding, please set an appropriate time zone offset according to the environment.
Please refer the JDK API list java.util.TimeZone for custom timezone IDs.
For Web Platform
Please specify the custom time zone ID in the Java-VM system property "user.timezone" in "intra-mart / platform / java / server / command / option" in conf / imart.xml of ApplicationRuntime.
Setting example when the time zone is Japan time (JST)
<option>-cp %SYSTEMCLASSPATH% -Xms%XMS% -Xmx%XMX% -XX:PermSize=128m -XX:MaxPermSize=128m -Djava.awt.headless=true -Duser.timezone=GMT+0900</option>
For Accel Platform(Resin)
Please specify the custom time zone ID in the Java-VM system property "user.timezone" in jvm_args of the Resin installation directory /conf/resin.properties.
●Setting example when the time zone is Japan time (JST)
jvm_args : -Duser.timezone=GMT+0900 -Dfile.encoding=UTF-8 ... (The latter half is omitted)
-- Target ------------------------------------------------------------------------
iAP/Accel Platform/All Updates
iWP/Web System Construction Platform/WebPlatform/AppFramework
----------------------------------------------------------------------------------
FAQID:340