Re: How to handel Day Light Saving in GWT2.0
Thanks. How can i get the client's time zone in server side and comapre with my server located zone and do the need full conversation. On Sun, Jan 15, 2012 at 11:53 PM, Paul Robinson ukcue...@gmail.com wrote: Timezones are a pain in javascript because it just doesn't do them. If you have a javascript Date on the client, it will always display in the client's timezone. If you want to apply timezone offsets, you must do that on the server. You can't then simply transfer the resulting java.util.Date via RPC because the timezone will be converted to the browser's timezone (unless that's what you want). So you might need to format the date on the server, or transfer it as separate day-month-year values. HTH Paul On 13/01/12 17:13, Deekay wrote: Hi, Can any one have word of wisdom on this. My case is like ..I am saving user DOB in PST format, I need to show the DOB in requested client timezone. Can I converse it in serverside ,does the Http request gives the locale based on the client location or it only it gives default locale as per the prefered language set.Like if it is english ? Or i have to explicitly define a js variable and send the offset to server and compare there. Appreciate any enlightenment on this. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@**googlegroups.comgoogle-web-toolkit@googlegroups.com . To unsubscribe from this group, send email to google-web-toolkit+** unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/** group/google-web-toolkit?hl=enhttp://groups.google.com/group/google-web-toolkit?hl=en **. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to handel Day Light Saving in GWT2.0
to clarify it explicitly ... i was thinkng to send the offset from client side in request or session and compare the offset with Server side tiem zone.can you please tell me is GWT has any setting to handel it .Or I have to handel only it in server side. As you said .if I am not sending from js then how i ll get the client zone from request. I m invoking a restelt resource for the action. On Mon, Jan 16, 2012 at 12:10 AM, dwitikrushna pattanaik dwiti...@gmail.com wrote: Thanks. How can i get the client's time zone in server side and comapre with my server located zone and do the need full conversation. On Sun, Jan 15, 2012 at 11:53 PM, Paul Robinson ukcue...@gmail.comwrote: Timezones are a pain in javascript because it just doesn't do them. If you have a javascript Date on the client, it will always display in the client's timezone. If you want to apply timezone offsets, you must do that on the server. You can't then simply transfer the resulting java.util.Date via RPC because the timezone will be converted to the browser's timezone (unless that's what you want). So you might need to format the date on the server, or transfer it as separate day-month-year values. HTH Paul On 13/01/12 17:13, Deekay wrote: Hi, Can any one have word of wisdom on this. My case is like ..I am saving user DOB in PST format, I need to show the DOB in requested client timezone. Can I converse it in serverside ,does the Http request gives the locale based on the client location or it only it gives default locale as per the prefered language set.Like if it is english ? Or i have to explicitly define a js variable and send the offset to server and compare there. Appreciate any enlightenment on this. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@** googlegroups.com google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+** unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/** group/google-web-toolkit?hl=enhttp://groups.google.com/group/google-web-toolkit?hl=en **. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to handel Day Light Saving in GWT2.0
You can use (new Date().getTimezoneOffset()) on the client to get its timezone offset, and send that to the server. Also, note that you can use DateTimeFormat.format(Date, TimeZone) to format a date to a particular timezone on the client. Paul On 16/01/12 08:32, dwitikrushna pattanaik wrote: to clarify it explicitly ... i was thinkng to send the offset from client side in request or session and compare the offset with Server side tiem zone.can you please tell me is GWT has any setting to handel it .Or I have to handel only it in server side. As you said .if I am not sending from js then how i ll get the client zone from request. I m invoking a restelt resource for the action. On Mon, Jan 16, 2012 at 12:10 AM, dwitikrushna pattanaik dwiti...@gmail.com mailto:dwiti...@gmail.com wrote: Thanks. How can i get the client's time zone in server side and comapre with my server located zone and do the need full conversation. On Sun, Jan 15, 2012 at 11:53 PM, Paul Robinson ukcue...@gmail.com mailto:ukcue...@gmail.com wrote: Timezones are a pain in javascript because it just doesn't do them. If you have a javascript Date on the client, it will always display in the client's timezone. If you want to apply timezone offsets, you must do that on the server. You can't then simply transfer the resulting java.util.Date via RPC because the timezone will be converted to the browser's timezone (unless that's what you want). So you might need to format the date on the server, or transfer it as separate day-month-year values. HTH Paul On 13/01/12 17:13, Deekay wrote: Hi, Can any one have word of wisdom on this. My case is like ..I am saving user DOB in PST format, I need to show the DOB in requested client timezone. Can I converse it in serverside ,does the Http request gives the locale based on the client location or it only it gives default locale as per the prefered language set.Like if it is english ? Or i have to explicitly define a js variable and send the offset to server and compare there. Appreciate any enlightenment on this. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com mailto:google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com mailto:google-web-toolkit%2bunsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to handel Day Light Saving in GWT2.0
Timezones are a pain in javascript because it just doesn't do them. If you have a javascript Date on the client, it will always display in the client's timezone. If you want to apply timezone offsets, you must do that on the server. You can't then simply transfer the resulting java.util.Date via RPC because the timezone will be converted to the browser's timezone (unless that's what you want). So you might need to format the date on the server, or transfer it as separate day-month-year values. HTH Paul On 13/01/12 17:13, Deekay wrote: Hi, Can any one have word of wisdom on this. My case is like ..I am saving user DOB in PST format, I need to show the DOB in requested client timezone. Can I converse it in serverside ,does the Http request gives the locale based on the client location or it only it gives default locale as per the prefered language set.Like if it is english ? Or i have to explicitly define a js variable and send the offset to server and compare there. Appreciate any enlightenment on this. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
How to handel Day Light Saving in GWT2.0
Hi, Can any one have word of wisdom on this. My case is like ..I am saving user DOB in PST format, I need to show the DOB in requested client timezone. Can I converse it in serverside ,does the Http request gives the locale based on the client location or it only it gives default locale as per the prefered language set.Like if it is english ? Or i have to explicitly define a js variable and send the offset to server and compare there. Appreciate any enlightenment on this. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.