Sets the time-zone for the current thread only.
Each thread could have an independent time zone, called
the thread time zone.
When Invoking this method under a thread that serves requests,
remember to clean up the setting upon completing each request.
TimeZone old = TimeZones.setThreadLocal(newValue);
try {
...
} finally {
TimeZones.setThreadLocal(old);
}
Parameters: timezone - the thread time zone; null to denote no thread time zone(and the system's timezone will be used instead) the previous thread time zone, or null if no previous time zone |