W3C home > Mailing lists > Public > www-international@w3.org > October to December 2001

Re: Time Zones in Searches

From: Thierry Sourbier <webmaster@i18ngurus.com>
Date: Fri, 26 Oct 2001 16:19:21 +0200
Message-ID: <08cf01c15e29$359aebe0$938bfea9@dell400>
To: "Www-International-w3c-org \(E-mail\)" <www-international@w3.org>
> Is there a standard/commonly accepted way to search dates with time zones.

A certainly common approach is, as you did, to convert all date/time to UTC and do the comparaison all comparaison in UTC. Now as you point out this raises the question of converting to UTC when the user time zone may not be known. More insights on your application and the use of the dates you are manipulating would be very usefull to determine if:

- The conversion to UTC is indeed necessary (e.g. if you are storing local event date and time this may not be necessary).
- There are ways to infer the user time zone (e.g. user login information).
- Your user base can understand the need for time zone (e.g. scientifics).
- Great accuracy is needed (what the system should cover to be useful to the users).

Also I like to point out that accurate convertion to UTC is not an easy thing as it is complicated by the fact that many places use daylight saving making convertion of a time/date in the past or future much more complicated than having a single offset. Java has greatly enhanced its TimeZone class to make this sort of calculation much easier, the referring source in the subject is probably TZ (http://www.twinsun.com/tz/tz-link.htm). You'll find may time zone information related links there.

Regards,

Thierry
<><><><><><><><><><><><><><><><><><><><><><>
www.i18ngurus.com - Open Internationalization Resources Directory
  ----- Original Message ----- 
  From: Eric Kreiser 
  To: Www-International-w3c-org (E-mail) 
  Sent: Friday, October 26, 2001 3:12 PM
  Subject: Time Zones in Searches


  Is there a standard/commonly accepted way to search dates with time zones.   

  I am developing an application that I need to store all dates relative to time zone.  (Using Oracle 8i as a database)
  When the user enters the information, before storing it to the database, I convert all date/times to UTC (I need a consistent/comparable date/time).

  Now the problem, when the user is searching based on these dates
  ----Is it common to have the user specify a time zone relative to the date/times on the search screen???
  ----Or, is it common to have the user just enter a date/time on the search screen and return items that occurred on that date/time irregardless of time zone???

  Is anyone doing anything similar?  Any suggestions/comments,etc... are welcome.   
Received on Friday, 26 October 2001 10:17:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 19:16:58 GMT