Date field and date dataprovider is displayed incorrect

Forum to discuss the Web client version of Servoy.

Re: Date field and date dataprovider is displayed incorrect

Postby jcompagner » Fri Jul 10, 2009 9:29 am

how do you know what is in the database?

So you are saying with that property set to true.
If you insert a date in timezone X then read it back in in another client in timezone Y that client sees another time?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8839
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Date field and date dataprovider is displayed incorrect

Postby Karel Broer » Wed Jul 15, 2009 1:36 pm

jcompagner wrote:set the property to true:
Client in TimeZone X sends Date X (10:00) -> send to server in TimeZone Z -> Date saved converted so that it is also seen as 10:00 at the server
Client in TimzeZone Y reads Date X and sees again that date converted to its own time also at 10:00

When servoy.use.client.timezone = true, the user time zone date and time is saved into the database when using application.getServerTimeStamp() even if the user is in another time zone then the server. Is this correct behaviour?
Karel Broer
ServoyCamp - http://www.servoycamp.com
User avatar
Karel Broer
 
Posts: 779
Joined: Mon May 03, 2004 12:49 am
Location: Doetinchem

Re: Date field and date dataprovider is displayed incorrect

Postby jcompagner » Wed Jul 15, 2009 10:45 pm

which servoy version are you talking about?

in 3.5 the server time will not be converted when going from the server to the client (and when you save it will) so this isnt really correct yes (the client doesnt really 'see' the server time)

in 4.1.1+ this is fixed then if you ask the server time and it is 10 oclock it will be "10:00" when arriving in the client
and when saved it will really be savend as "10:00" (even if the client time is "12:00"
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8839
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Date field and date dataprovider is displayed incorrect

Postby Karel Broer » Wed Jul 15, 2009 11:10 pm

jcompagner wrote:which servoy version are you talking about?

3.5.7
in 3.5 the server time will not be converted when going from the server to the client (and when you save it will) so this isnt really correct yes (the client doesnt really 'see' the server time)

Ergh.. we try to track -method- execution duration time with users on different time zones. The log records contain now wrong start and end times...
in 4.1.1+ this is fixed then if you ask the server time and it is 10 oclock it will be "10:00" when arriving in the client
and when saved it will really be savend as "10:00" (even if the client time is "12:00"

Perfect. Thank you.
Karel Broer
ServoyCamp - http://www.servoycamp.com
User avatar
Karel Broer
 
Posts: 779
Joined: Mon May 03, 2004 12:49 am
Location: Doetinchem

Re: Date field and date dataprovider is displayed incorrect

Postby jcompagner » Thu Jul 16, 2009 9:21 am

you want to track what exactly?
client side method execution time? why do you need to have a server time for that?
You want to track when the method did start? or how long it toke?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8839
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Date field and date dataprovider is displayed incorrect

Postby Karel Broer » Thu Jul 16, 2009 9:49 am

jcompagner wrote:you want to track what exactly?
client side method execution time? why do you need to have a server time for that?
You want to track when the method did start? or how long it toke?

I want to track the performance influence of methods, executed by a certian user, for other users in different time zones.
Karel Broer
ServoyCamp - http://www.servoycamp.com
User avatar
Karel Broer
 
Posts: 779
Joined: Mon May 03, 2004 12:49 am
Location: Doetinchem

Re: Date field and date dataprovider is displayed incorrect

Postby jcompagner » Thu Jul 16, 2009 9:52 am

so then the only thing to store for example in a database is something like

clientid/userid | methodname | elapsed_time

and in another table you have something that maps a clientid/userid to a timezone.

then you dont have to get servertime that looks a bit heavy for me to track method execution (thats also a round trip again)
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8839
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Date field and date dataprovider is displayed incorrect

Postby Karel Broer » Thu Jul 16, 2009 10:06 am

jcompagner wrote:so then the only thing to store for example in a database is something like
clientid/userid | methodname | elapsed_time
and in another table you have something that maps a clientid/userid to a timezone.
then you dont have to get servertime that looks a bit heavy for me to track method execution (thats also a round trip again)

Thanks for thinking along Johan, but we also need to know the exact method execution date/time.
Karel Broer
ServoyCamp - http://www.servoycamp.com
User avatar
Karel Broer
 
Posts: 779
Joined: Mon May 03, 2004 12:49 am
Location: Doetinchem

Re: Date field and date dataprovider is displayed incorrect

Postby jcompagner » Thu Jul 16, 2009 11:50 am

ok then insert start and end time instead of elapsed.

And then just the start and endtimes of the client and have that other table that tells you wat the timezone is.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8839
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Previous

Return to Servoy Web Client

Who is online

Users browsing this forum: No registered users and 7 guests