Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8022 Posts in 1850 Topics- by 2099 Members - Latest Member: roi
Calendar Script CommunityCustomizationHacks and Mods (Moderators: scott, DanO, Marty)User Select Time Zone to View
Pages: [1]   Go Down
Print
Author Topic: User Select Time Zone to View  (Read 239 times)
0 Members and 1 Guest are viewing this topic.
Steve
New Member
*

Karma: 0
Offline Offline

Posts: 0

photographer


WWW
« on: February 03, 2003, 02:05:00 PM »

I did a search on discussion of time zone and found a few hints, but am still stumped on the following question:

How can I allow a user to click on a choice of viewing times in either Eastern or Central time zone. I'd prefer to make it a choice at the the intial Grid/List view as opposed to turning folks loose in the Admin menus.

All event times will be entered in Eastern time. However, a number of users will want to participate in events and need to conver over to Central time.

Granted, it is only an hour's difference, but you would not believe the number of time folks (including me) have tripped over the time zone.


-Steve

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 220

Please don't PM me. Post in the open forum.


WWW
« Reply #1 on: February 08, 2003, 06:16:00 PM »

** How can I allow a user to click on a choice of viewing times in either Eastern or Central time zone. **

The only way I can see to do it would be to modify the sub populateTemplateVariables routine of calendar.pl to first check for a passed variable before setting the script time.

Right now that routing has:

sub populateTemplateVariables {
   $localtime_offset = 3600*$Config->get("time_zone_offset");
   ($now_ss,$now_mi,$now_hh,$now_dd,$now_mm,$now_yy,$now_wd,$now_yd,$now_dst)
= localtime(time+$localtime_offset);

You would have to do something like:

sub populateTemplateVariables {
if ( Passed_Variable )
{
$localtime_offset = 3600 * Passed_Variable ;
}
else
{
$localtime_offset = 3600*$Config->get("time_zone_offset");
}


     Keep in mind that the above is only pseudo code and not actual working code.

Dan O.

[This message has been edited by DanO (edited February 08, 2003).]

Logged
Pages: [1]   Go Up
Print
Jump to: