Andrew Zeneski <[EMAIL PROTECTED]> wrote:
"Just my two cents here, I do not want everything to depend on a user  
selecting his timezone. There are many cases where we will no want to  
force this dependency."

I addressed that scenario. In those cases the application creates its own 
defaults depending upon the circumstances.

"This was solved by obtaining the number of minutes from GMT offset in  
javascript (getTimezoneOffset()). Since we had no way to get a  
TimeZone string from javascript (only the number of minutes) the only  
way to do this was to pull the number of minutes and adjust the  
current time (which in this case, server time was GMT)."

If I showed you a better way to handle this scenario, would you use it?

"The method I added to UtilDateTime was to help with this, but now I  
see it can be greatly improved. I think this method will be very  
useful. One thing which needs to change, is since the minutes offset  
is based on GMT, we need to make sure the Timestamp is set to GMT  
time, before the adjustment is made. This will give us a valid time in  
the user's timezone without a TimeZone object."

What you're not understanding about Timestamps is that they are already 
referenced to GMT. There is no way to "set" a Timestamp to GMT because it is 
already there.

-Adrian


 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to