1
votes

Creating the object for Calendar and get the time and hour and minute from it.

It gives one hour less in iPad devices for Easter Time Zone (-5:00).

is this existing, does we need to consider any code changes on creating the Calendar Object.

   Calendar now = Calendar.getInstance();

    Dialog.show("Time value -- 1", now.getTime().toString(),"ok",null);
    now.set(Calendar.YEAR, now.get(Calendar.YEAR));
    now.set(Calendar.MONTH, now.get(Calendar.MONTH));
    now.set(Calendar.DAY_OF_MONTH, now.get(Calendar.DAY_OF_MONTH));
    now.set(Calendar.HOUR_OF_DAY, now.get(Calendar.HOUR_OF_DAY));
    now.set(Calendar.MINUTE, now.get(Calendar.MINUTE));
    now.set(Calendar.DAY_OF_WEEK, now.get(Calendar.DAY_OF_WEEK));

    Dialog.show("Time value -- 2", now.getTime().toString(),"ok",null);
    Dialog.show("Time value -- 3", " "+now.getTimeZone(),"OK",null);
    java.util.TimeZone timeZone = (java.util.TimeZone)now.getTimeZone();


 Dialog.show("timeZone.useDaylightTime() -- ",  timeZone.useDaylightTime()+" " ,"ok",null);

From the above code in iPad version 10.2 and for Time Zone New York, U.S.A we are getting useDaylightTime as false. whereas in simulator its value is true.

is there any way to handle DST issue on iPads in codename one.

due to calendar code, we are getting 1 hour less from actual time.

Thanks in advance.

1
What does timezone.getID() print and did you set/manipulate the timezone setting in code in any way? - Shai Almog

1 Answers

0
votes

There was a bug in the iOS VM that is now fixed. The fix should be available on the build server soon (within the next day or so). That will fix this issue.