One of the features I love with Drupal 4.2.0-rc is the calendar now only has an active link on the days there is new content. I've just moved my Drupal site back to my webhost that the server is in an Australian Timezone, but I'm located in Colorado, USA (MDT). I noticed tonight that when I entered my blog entry, that the calendar has tomorrow (the 19th) with a link on it, but when I look at the entry it shows a timestamp of tonight (the 18th) due to my personal settings. I'm guessing this is due to the server being in an AU timezone is the cause for this. So I'm wondering, is there a way to set the default timezone for the site for when entries appear to be posted (so it would be an offset from the server timezone)? This way if I post an entry at 11:59pm MDT, it will show up on the Calendar as the correct date (for me). Or the other option is to make the calendar look at the timezone setting of the user account (again a default timezone for the site would need to be defined) so that it puts the link on the correct date (based on the user's timezone).

Comments

al’s picture

As subject. :)

cdpark’s picture

It seems that there are some bugs in the patch.

I'm in Korea (GMT+09 zone). And the date in calendar module is displayed incorrectly after 3:00 pm. It may add additional +9 hours.

When computing $start_of_today, it adds $user->timezone twice. (timezone is already applied in $offset)

Anonymous’s picture

Just to be safe, I'd prefer to upload only the patched file if possible -- I'd hate to overwrite a file I currently have and mess it up somehow. So, which file(s) were tweaked for this patch to work?

Thanks! Keep up the development work!

mdlime’s picture

I didn't find the patch in contributions/for_review. What is the title?
I would like to change this settings so that the timezone does not affect the schedule of the event. How to do?

I got this line in the module of Event that I use:
// these time presentations are formatted by Admin Pref and by user's selected timezone
$prebody = form_item(t("Time"), " ". t("Start: "). format_date($node->start). "
". " ". t("End: "). format_date($node->end));

Merci!

al’s picture

I've patched this up properly. Should hit the trunk over the next couple of days.

Anonymous’s picture

Cool... What service!!! :D Thanks a lot!

pianoman’s picture

I have the problem of the site's server being in a different time zone than the majority of my users by 11 hours and it pops up when users attempt to add their birthday to profiles.

I've been looking everywhere I could but can't find a patch for this - where can it be found?

Mike@frazierhome.net’s picture

Ok, so the timezone fix works (I'm on 4.2 release now) for me when I'm logged in, but could we get a patch to allow us to set a default timezone for the site? I don't allow logins, and when people visit my site, I want them to see my home timezone and not the timezone of where the webhost is located.

So I see this as a site configuration change to add a place to set the default timezone for users not logged in (ie: the site's timezone).