Forum OpenACS Development: Response to Date formats in OpenACS

Collapse
Posted by carl garland on

Here is how I am dealing with date formats ... one way to solve not the only or best by far :)

  • I set the database and AOLserver to GMT and all times are stored in GMT.
  • I let each user set their own timezone
  • I also have timezone fields for each object / group.
  • When querying db I normalize the datetime to GMT accordingly by offset
  • Likewise when returning date I format to the appropriate *view* or timezone whether it be user / object
  • I also let the user specify their preferred time format for viewing

I yanked most of the code for this functionality and forwarded it on to Ben awhile back. Its not pretty but should be pretty straigtht forward. Also if anyone is porting the calendar module and interested I will forward code that replaces all db access for the ad-calendar-widget.tcl file. Profiling code has produced about 90% increase for calls to procs. See post Here for more info.

Best Regards, Carl Garland