I don't think that a JavaScript Date can be create in any other timezone then the default one. http://www.w3schools.com/jsref/jsref_obj_date.asp
There is no timezone information, you can only read the offset. But you could use the method "setUTCDate" to set the time/date correctly. But you would need to calc the UTC Date/time from the given date/time all save/update event methods in the client. Sebastian 2012/4/17 Maxim Solodovnik <[email protected]> > Actually there is option to set correct timezone: You can pass date as > date/string and create valid date object using Calendar > with specifying current user TZ. > Also Irina told me TZ is set correctly while event editing ... > > On Tue, Apr 17, 2012 at 14:46, Maxim Solodovnik <[email protected] > >wrote: > > > client machine timezone is GMT+7 > > > > > > On Tue, Apr 17, 2012 at 14:44, [email protected] < > > [email protected]> wrote: > > > >> Just let me understand it first :) > >> > >> 2) default user TZ (GMT+7) (user level: admin) > >> 3) another user TZ (GMT-4) (user level: user) > >> > >> => what is the timezone of the browser? I mean if you create a Date > Object > >> is JavaScript it always will have the timezone of the browser. There is > >> also no chance of changing that as JavaScript Date has no timezone info > >> ... > >> same as java.util.Date. > >> This could be a problem. > >> > >> Admin or user level has no influence from my point of view. > >> > >> Sebastian > >> > >> 2012/4/17 Maxim Solodovnik <[email protected]> > >> > >> > OK > >> > > >> > Here are my steps: > >> > 1) server TZ: MSK (GMT+3) > >> > 2) default user TZ (GMT+7) (user level: admin) > >> > 3) another user TZ (GMT-4) (user level: user) > >> > > >> > The issue is NOT reproducible for the default admin user > >> > The issue is reproducible for "another user" > >> > > >> > The event created using both "New Event" button and click on the > >> calendar > >> > Default event time is not changed: (always set to be 14:00-15:00) > >> > The time displayed after creation is 03:00 > >> > > >> > @Sebastian should I handle it? or you going to fix it yourself? > >> > > >> > On Tue, Apr 17, 2012 at 14:17, [email protected] > >> > <[email protected]>wrote: > >> > > >> > > ok, > >> > > > >> > > let me describe you the current process: > >> > > > >> > > A client in timezone: Moscow (+0400) > >> > > A server in timezone: Berlin (+0200) > >> > > > >> > > The client generates a JavaScript Date Object (always in the local > >> > timezone > >> > > of the User) > >> > > 1) The client sends Date Object: 16:00:00 15.04.2012 MTC > >> > > 2) Server will receive a java.util.Date in his local timezone: > >> > > The server method "saveAppointment" receives a Date Object: 14:00:00 > >> > > 15.04.2012 CEST > >> > > > >> > > 3) This time is stored in the database (databases have no timezone > >> info, > >> > > they only got timestamps, timestamps in database are alwas in the > >> local > >> > > timezone of the server and that way need no timezone info). > >> > > 4) Time is retrieved from database, client requests the Calendar via > >> the > >> > > REST WebService, date/time is calculated in the users timezone > >> > > > >> > > Something at 2) seems to be wrong. The rest is fine. It is strange > to > >> me > >> > as > >> > > I have been successfully testing it. > >> > > > >> > > Sebastian > >> > > > >> > > 2012/4/17 Maxim Solodovnik <[email protected]> > >> > > > >> > > > I'll try to debug, > >> > > > > >> > > > Irina seems to be able to reproduce it easily > >> > > > > >> > > > On Tue, Apr 17, 2012 at 13:03, Baskar Rajendran > >> > > > <[email protected]>wrote: > >> > > > > >> > > > > myne > >> > > > > > >> > > > > What timezone is your client machine? => IST gmt + 5.30 > >> > > > > userprofile ==> IST gmt + 5.30 > >> > > > > What timezone has the server machine? => Mon Apr 16 23:55:22 MDT > >> 2012 > >> > > > > What timezone is the default timezone specified in the > >> OpenMeetings > >> > > > server? > >> > > > > =>Etc/GMT--7 > >> > > > > What time is written in your db? => IST gmt + 5.30 > >> > > > > > >> > > > > -regards > >> > > > > baskar > >> > > > > > >> > > > > What timezone is in the user-profile of your client machine? => > >> GMT+0 > >> > > > > What timezone has the server machine? => GMT+0 > >> > > > > What timezone is the default timezone specified in the > >> OpenMeetings > >> > > > server? > >> > > > > => GMT+0 > >> > > > > What time is written in your db? => GMT+0 (because I commented > all > >> > > others > >> > > > > timezones in the XML file and I set GMT+0 as default) > >> > > > > > >> > > > > > >> > > > > > >> > > > > Mon Apr 16 23:55:22 MDT 2012 > >> > > > > > >> > > > > > >> > > > > On Tue, Apr 17, 2012 at 12:53 AM, Hamdi THABET < > >> > > [email protected] > >> > > > > >wrote: > >> > > > > > >> > > > > > What timezone is your client machine? => Win7 x64 - > Waterfox > >> x64 > >> > > > > > What timezone is in the user-profile of your client machine? > => > >> > > GMT+0 > >> > > > > > What timezone has the server machine? => GMT+0 > >> > > > > > What timezone is the default timezone specified in the > >> OpenMeetings > >> > > > > > server? => GMT+0 > >> > > > > > What time is written in your db? => GMT+0 (because I commented > >> all > >> > > > others > >> > > > > > timezones in the XML file and I set GMT+0 as default) > >> > > > > > > >> > > > > > I'm in Tunisia, I normally I need the "GMT+1" which I tried > >> before > >> > > but > >> > > > > > there was the same problem in calendar. > >> > > > > > > >> > > > > > > >> > > > > > > >> > > > > > > >> > > > > > >> > > > > >> > > > > >> > > > > >> > > > -- > >> > > > WBR > >> > > > Maxim aka solomax > >> > > > > >> > > > >> > > > >> > > > >> > > -- > >> > > Sebastian Wagner > >> > > https://twitter.com/#!/dead_lock > >> > > http://www.openmeetings.de > >> > > http://www.webbase-design.de > >> > > http://www.wagner-sebastian.com > >> > > [email protected] > >> > > > >> > > >> > > >> > > >> > -- > >> > WBR > >> > Maxim aka solomax > >> > > >> > >> > >> > >> -- > >> Sebastian Wagner > >> https://twitter.com/#!/dead_lock > >> http://www.openmeetings.de > >> http://www.webbase-design.de > >> http://www.wagner-sebastian.com > >> [email protected] > >> > > > > > > > > -- > > WBR > > Maxim aka solomax > > > > > > -- > WBR > Maxim aka solomax > -- Sebastian Wagner https://twitter.com/#!/dead_lock http://www.openmeetings.de http://www.webbase-design.de http://www.wagner-sebastian.com [email protected]
