Author: sebawagner
Date: Fri Apr 27 17:51:55 2012
New Revision: 1331518

URL: http://svn.apache.org/viewvc?rev=1331518&view=rev
Log:
OPENMEETINGS-238 Calendar shows incorrect day of week for the actual date when 
timezone is GMT+10

Modified:
    
incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/components/calendar/dateSelector.lzx
    
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/popups/autoLoader.lzx
    
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/axis/services/CalendarWebService.java

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/components/calendar/dateSelector.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/components/calendar/dateSelector.lzx?rev=1331518&r1=1331517&r2=1331518&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/components/calendar/dateSelector.lzx
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/components/calendar/dateSelector.lzx
 Fri Apr 27 17:51:55 2012
@@ -346,7 +346,7 @@
        <method name="getDateFirstDayInMonth">
                <![CDATA[
                //First calc the date by the given first day in week
-               var newDateTemp = new Date(this.showingdate.getFullYear(), 
this.showingdate.getMonth(), 1);
+               var newDateTemp = new Date(this.showingdate.getFullYear(), 
this.showingdate.getMonth(), 1, 12); //set hours to 12 to prevent timezone 
issues
                ////Debug.write(newDateTemp);
                var factor = 0;
                if (newDateTemp.getDay()>this.firstdayinweek)   
@@ -362,7 +362,7 @@
                if (newDate.getDate()>1 && 
newDate.getMonth()==newDateTemp.getMonth()){
                        newDate = new Date( (newDate.getTime()-(86400000*7)) );
                }
-               ////Debug.write("getDateFirstDayInMonth ",newDate);
+               if ($debug) Debug.write("getDateFirstDayInMonth ",newDate);
                return newDate;
                ]]>
        </method>

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/popups/autoLoader.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/popups/autoLoader.lzx?rev=1331518&r1=1331517&r2=1331518&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/popups/autoLoader.lzx
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/popups/autoLoader.lzx
 Fri Apr 27 17:51:55 2012
@@ -22,7 +22,7 @@
     
 <class name="autoLoader" extends="view" align="center" valign="middle" 
pixellock="true">
 
-       <attribute name="maxwidth" value="300" type="number" />
+       <attribute name="maxwidth" value="400" type="number" />
        <attribute name="maxsteps" value="22" type="number" />
        <attribute name="currentsteps" value="0" type="number" />
        
@@ -49,13 +49,13 @@
                this.loadingbar._loading.setAttribute('width',w);
        </method>
     
-    <text fontsize="11" name="error" y="20"/>
-    <text fontsize="11" name="_src" y="40" />
+    <text fontsize="11" name="error" y="20" fgcolor="0x666666"/>
+    <text fontsize="11" name="_src" y="50" align="center" fgcolor="0x666666"/>
     
-    <view name="loadingbar" bgcolor="$once{ 
canvas.getThemeColor('styleMenuBarBaseColor') }" height="10"  pixellock="true"
-          x="-5" y="60" width="$once{ parent.maxwidth }" visibility="hidden">
-          <view x="1" y="1" width="$once{ parent.width-2 }" height="8" 
bgcolor="0xFFFFFF"/>
-          <view name="_loading" x="1" y="1" width="0" height="8"  
pixellock="true" 
+    <view name="loadingbar" bgcolor="$once{ 
canvas.getThemeColor('styleMenuBarBaseColor') }" height="4"  pixellock="true"
+          x="-5" y="40" width="$once{ parent.maxwidth }" visibility="hidden">
+          <view x="1" y="1" width="$once{ parent.width-2 }" height="2" 
bgcolor="0xFFFFFF"/>
+          <view name="_loading" x="1" y="1" width="0" height="2"  
pixellock="true" 
                        bgcolor="$once{ 
canvas.getThemeColor('styleMenuBarBaseColor') }"/>
     </view>
     

Modified: 
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/axis/services/CalendarWebService.java
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/axis/services/CalendarWebService.java?rev=1331518&r1=1331517&r2=1331518&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/axis/services/CalendarWebService.java
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/src/org/openmeetings/axis/services/CalendarWebService.java
 Fri Apr 27 17:51:55 2012
@@ -724,6 +724,7 @@ public class CalendarWebService {
                                List<Week> weeks = new ArrayList<Week>(6);
                                Calendar currentDate = Calendar.getInstance();
                                currentDate.setTime(startDate);
+                               currentDate.set(Calendar.HOUR_OF_DAY, 12); // 
set to 12 to prevent timezone issues
                                currentDate.set(Calendar.DATE, 1);
 
                                int currentWeekDay = 
currentDate.get(Calendar.DAY_OF_WEEK);
@@ -780,12 +781,12 @@ public class CalendarWebService {
 
                                        for (int i = 0; i < 7; i++) { // 7 days 
a week
 
-                                               Calendar tCal = 
Calendar.getInstance();
+                                               Calendar tCal = 
Calendar.getInstance(timezone);
                                                
tCal.setTimeInMillis(startWeekDay.getTimeInMillis()
                                                                + (z * 
86400000L));
-
+                                               
                                                Day day = new 
Day(tCal.getTime());
-
+                                               
                                                for (Appointment appointment : 
appointments) {
                                                        if (appointment
                                                                        
.appointmentStartAsCalendar(timezone).get(


Reply via email to