Forum OpenACS Q&A: Re: timezone usage

Collapse
6: Re: timezone usage (response to 5)
Posted by Jerry Asher on
A couple of issues....

Yes, I deleted all timezone information prior to 2002 on my system, AND I also deleted all timezone information after 2008!  The timezone data went way up to 2038, I think, but the truth is that due to local political issues, volcanism, and global issues such as energy crises and asteroid strikes, locales do change their timezone information from year to year.  It needs to be maintained, and similarly, anything to remove records from joins gots to be a good thing, right?  But where did the data come from?

I also added a variety of "obvious" indices that aren't included in the tz data.  Are they useful?  Oh, uh, sure.  (I don't know, but the plan looks good.)

I believe my experience with [clock scan ... ] wasn't promising.  IIRC it understands timezones as gmt offsets ("-07", etc.), but not timezones as in "PST".

I am not sanguine about allowing users to create their own timezone data.  Maybe, but not for critical functionality.  (Spring Ahead, starve a fever, I can never quite remember.)

It would be interesting to get a few people working on such projects to discuss what a lowlevel APIs would be useful, and to discuss what could be added to various data models to make such stuff efficient.

And....  It seems to me that an almost mandatory adjunct of local time sensitive webfeatures is the creation of a local time sensitive OACS cron job or something similar....

"Run this task at 2:32 AM Tajikistan time....", "At 11PM local time, where are my kids?", or "It's 3:30AM GMT, run local time jobs...."

Collapse
7: Re: timezone usage (response to 6)
Posted by Tom Jackson on

Jerry, when users input times, they need to know the timezone. If it is a personal calendar, then maybe a global config could 'assume until told otherwise' that the times are in the user's currently configured timezone. But as long as users are doing the input, they need to know the info, there is no way around that.

clock scan takes a subset of available timezones, I think, the pg data in ref-timezones seems even more limited. I know this because I picked timezone names off the internet and tried them with clock scan, and using them as input to pg.

Anyway, timezones only matter to the user, and only the inputing user knows if that data is correct, so having them create their own timezones, with offsets should be okay. All I'm talking about is a timezone name and offset, in seconds from GMT. Users could also have their own private timezone names. Instead of having to always remember PDT from PST, why not 'Pacific Winter', 'Pacific Summer', or 'My Company Home Office'? For online communities, it is important to consider that users might want to switch timezones on the displayed dates to make sure they know when events are happening in their local time, or East Coast time, or when it will be when they get to their destination in some other location.

Said another way: timezones provide context for an absolute time GMT. If users can switch the context at will, it is more likely they input data correctly, or update it later on, or just figure out what it means.