Hello, this issue was initially mentioned here: http://drupal.org/node/1162266#comment-4902686 but i believe it's a separate issue from the "default empty date fields" issue. Thanks for the amazing work on this module!

My issue:
Anonymous users (only), when trying to select the date, are only given 1969 as an option.

...I'm using Webform 6.x-3.12, and Date module 6.x-2.7, and Drupal 6.22. I checked /sites/all/modules/webform/components/date.inc and verified the code from the patch in #14 was indeed already in place with this webform version.

I've tried:
setting a default value for the date component and leaving the default value empty
flushing all caches
deleting the date field and re-adding as a new one

This only happens for me when anonymous user, everything works when logged in, as mentioned above. This seems to happen whether i have a default value set or not.

please see my screenshot attached...

Update: from http://drupal.org/node/1162266#comment-4977890

...I realized that the reason my date was only showing 1969 available for the year for anonymous users was because under "Default value timezone:" i had "User timezone" selected... of which of course (I suppose?) none is really "selected" for the anonymous user. Simply switching to "Website Timezone" fixed the issue stated in #23 for me. ...

Perhaps an anonymous user's timezone should default to the Website Timezone?

Comments

Title:no anonymous user default timezone? Only date available for selection is 1969Anonymous users do not use site default timezone
Status:Active» Fixed
StatusFileSize
new659 bytes
new672 bytes

I haven't been able to confirm this problem, but I did find a bug in our timezone handling that matches what you're describing. If custom user timezones are set, a NULL value is indeed often used for anonymous users instead of the default site timezone. I'm not sure if this would solve your date option only providing 1969 as an option, but it seems like it should fix some timezone handling for anonymous users.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Version:6.x-3.14» 7.x-4.0-alpha3
Status:Closed (fixed)» Needs work

Reopening as I'm experiencing the same thing. When using a date field component with the default value set to 'today', and the timezone set to User timezone, anonymous users are seeing the incorrect date (19 July 2012) where authenticated users are seeing 20 July 2012

StatusFileSize
new766 bytes

This was being caused by the first if statement passing in webform_strtodate for anon users. This patch fixes that

Status:Needs work» Needs review

Status:Needs review» Fixed

Brilliant. Looks like a more reliable approach than what I had tried before. Committed to both 3.x branches and the 7.x-4.x branch.

Thanks, attribution would be appreciated next time.

I posted this patch same as all others, the attribution is inline (part of the comment) rather than official Git way (see http://drupalcode.org/project/webform.git/commit/74afb67cc9297f4cd089b1d...). Currently my patch workflow doesn't involve entering e-mail addresses and names, but in any case your patch wasn't formatted with attribution anyway. I'll probably start including Git attribution when Eclipse starts recognizing it from the Apply patch from clipboard command.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.