I'm using the yui.calendar.DateTimeField widget on a page with some other
timezone sensitive data and I get the right timezone on the other fields
but not with DateTimeField. When I stepped into the DateTimeField code,
I came to line 417:
TimeZone zone = getClientTimeZone();
which takes me to:
protected TimeZone getClientTimeZone()
{
ClientInfo info = Session.get().getClientInfo();
if (info instanceof WebClientInfo)
{
return
((WebClientInfo)info).getProperties().getTimeZone();
}
return null;
}
This method is returning null via this line:
return
((WebClientInfo)info).getProperties().getTimeZone();
All the properties in the ClientInfo appear to be defaults.
Now, I'm doing pretty much the same thing in my session, where I'm caching
the timezone (our base page checks the timezone via the session, so this
happens when new sessions are established).
public TimeZone getTimeZone()
{
if (_timezone == null)
{
_timezone = getClientInfo().getProperties().getTimeZone();
if (_timezone == null)
_timezone = TimeZone.getTimeZone("US/Eastern");
}
return _timezone;
}
This part works fine - all the pages that need the timezone get it and render
date/times correctly.
I was able to easily work around this by subclassing DateTimeField and pushing
in the timezone manually - but I'm wondering what I'm doing wrong that is
causing
the timezone to break in DateTimeField? (I'm assuming this works for everyone
else but me).
Any ideas?
TIA!
Chris
--
------------------------------------------------------------------------ -
Chris Merrill | Web Performance, Inc.
[email protected] | http://webperformance.com
919-433-1762 | 919-845-7601
Web Performance: Website Load Testing Software & Services
------------------------------------------------------------------------ -
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]