View Issue Details

This bug affects 1 person(s).
 20
IDProjectCategoryView StatusLast Update
03651Bug reportsSurvey takingpublic2017-01-18 15:29
Reporteruser3264Assigned Toc_schmitz  
PrioritynormalSeveritypartial_block 
Status closedResolutionfixed 
Product Version1.85+ 
Fixed in Version1.85+ 
Summary03651: very old dates default to 1969-12-31
Description

I have a problem where very old dates, like 1900-01-01 or 1901-01-01 default to very default to 1969-12-31 in the database and form once the page is moved on from (and thus saved).

This is an issue because we both have very old senior citizens in our study AND we were previously using 1900-01-01 as a "code date" for certain scenarios.

This rears its head only on the very furthest near 1900, but not the mid-1900's even though the default seems to be 1969 (or possible 1970 with a time zone conversion). I dug through the code extensively and believe it to have something to do with ADODB but could not pinpoint.

This reproduces itself in multiple surveys all the time so it shouldn't be hard to reproduce.

Additional Information

also had problems before finding this with the "date format" in the survey settings. dd.mm.yyyy format was corrupting the date values somewhere in the chain. Switching to yyyy-mm-dd fixed that. I don't know if that is intentional or not. Is that setting so you can match different database formats (which you'd think would be in config), or is the converter broken?

TagsNo tags attached.
Attached Files
limesurvey_survey_25886(2).csv (3,777 bytes)   
# LimeSurvey Survey Dump
# DBVersion 138
# This is a dumped survey from the LimeSurvey Script
# http://www.limesurvey.org/
# Do not change this header!

#
# SURVEYS TABLE
#
"sid","owner_id","admin","active","expires","adminemail","private","faxto","format","template","language","additional_languages","datestamp","usecookie","notification","allowregister","allowsave","autonumber_start","autoredirect","allowprev","printanswers","ipaddr","refurl","datecreated","listpublic","htmlemail","tokenanswerspersistence","usecaptcha","bounce_email","startdate","publicstatistics","publicgraphs","assessments","usetokens","attributedescriptions"
"25886","1","Your Name","Y","","your@email.org","Y","","G","default","en","","N","N","0","N","Y","0","N","Y","N","N","N","2009-09-04","N","Y","N","D","your@email.org","","N","N","N","N",""

#
# GROUPS TABLE
#
"gid","sid","group_name","group_order","description","language"
"39","25886","date test","0","dates...<br />","en"
"40","25886","this is the next page","1","next group page<br />","en"

#
# QUESTIONS TABLE
#
"qid","sid","gid","type","title","question","preg","help","other","mandatory","lid","lid1","question_order","language"
"39","25886","39","D","date1","date here?<br />","","","N","Y","0","0","0","en"
"40","25886","40","T","how","how do you feel?<br />","","","N","N","0","0","0","en"
"41","25886","39","D","date2","date:<br />","","","N","Y","0","0","1","en"

#
# ANSWERS TABLE
#

#
# CONDITIONS TABLE
#

#
# LABELSETS TABLE
#

#
# LABELS TABLE
#

#
# QUESTION_ATTRIBUTES TABLE
#
"qaid","qid","attribute","value"
"9","41","dropdown_dates","1"

#
# ASSESSMENTS TABLE
#

#
# SURVEYS_LANGUAGESETTINGS TABLE
#
"surveyls_survey_id","surveyls_language","surveyls_title","surveyls_description","surveyls_welcometext","surveyls_urldescription","surveyls_email_invite_subj","surveyls_email_invite","surveyls_email_remind_subj","surveyls_email_remind","surveyls_email_register_subj","surveyls_email_register","surveyls_email_confirm_subj","surveyls_email_confirm","surveyls_url","surveyls_endtext","surveyls_dateformat"
"25886","en","date test","","","","Invitation to participate in survey","Dear {FIRSTNAME},\n\nYou have been invited to participate in a survey.\n\nThe survey is titled:\n""{SURVEYNAME}""\n\n""{SURVEYDESCRIPTION}""\n\nTo participate, please click on the link below.\n\nSincerely,\n\n{ADMINNAME} ({ADMINEMAIL})\n\n----------------------------------------------\nClick here to do the survey:\n{SURVEYURL}","Reminder to participate in survey","Dear {FIRSTNAME},\n\nRecently we invited you to participate in a survey.\n\nWe note that you have not yet completed the survey, and wish to remind you that the survey is still available should you wish to take part.\n\nThe survey is titled:\n""{SURVEYNAME}""\n\n""{SURVEYDESCRIPTION}""\n\nTo participate, please click on the link below.\n\nSincerely,\n\n{ADMINNAME} ({ADMINEMAIL})\n\n----------------------------------------------\nClick here to do the survey:\n{SURVEYURL}","Survey registration confirmation","Dear {FIRSTNAME},\n\nYou, or someone using your email address, have registered to participate in an online survey titled {SURVEYNAME}.\n\nTo complete this survey, click on the following URL:\n\n{SURVEYURL}\n\nIf you have any questions about this survey, or if you did not register to participate and believe this email is in error, please contact {ADMINNAME} at {ADMINEMAIL}.","Confirmation of completed survey","Dear {FIRSTNAME},\n\nThis email is to confirm that you have completed the survey titled {SURVEYNAME} and your response has been saved. Thank you for participating.\n\nIf you have any further questions about this email, please contact {ADMINNAME} at {ADMINEMAIL}.\n\nSincerely,\n\n{ADMINNAME}","","","9"

#
# QUOTA TABLE
#

#
# QUOTA_MEMBERS TABLE
#

limesurvey_survey_25886(2).csv (3,777 bytes)   
save.php (27,137 bytes)
Bug heat20
Complete LimeSurvey version number (& build)7561
I will donate to the project if issue is resolved
Browserfirefox, coda preview
Database type & versionmysql 5.081
Server OS (if known)Linux 2.6.18-028stab060.8
Webserver software & version (if known)apache 2.2.1
PHP Version5.2.9

Relationships

has duplicate 03675 closeduser372 Datefield changes value after going back to previous page 

Users monitoring this issue

There are no users monitoring this issue.

Activities

user372

2009-09-04 21:42

  ~09386

Sorry, I don't get the meaning of your ticket ==> please explain in other words once more, attach a simple sample survey (survey structure as .csv-file) and a screenshot - Thx!

user3264

2009-09-04 22:38

  ~09393

Ok here is a sequence of screenshots that show some of the behaviors I am getting. http://picasaweb.google.com/erykmynn/LimesurveyDateBugScreenshots#

I'm also attaching the sample survey. I get problems both on my server, and on limesurvey demo.

user372

2009-09-05 14:58

  ~09401

@ erykmynn: thx for your screenshot - thats a really good explaination!

I can reproduce errors, not all but some of them ==> eg. when I enter 1-1-1900 at the second question and hit forward, go to previous, that 1-1-1900 has changed to 1-1-1970.

lemeur

lemeur

2009-09-05 15:01

developer   ~09403

This is a dateformat issue, I'm assigning this one to you then Carsten.

Thibault

c_schmitz

c_schmitz

2009-09-09 22:50

administrator   ~09482

Thank you Eryk for uncovering this problem.
I attached two files, please replace the existing files in

limesurvey\classes\datetimeconverter

and

\limesurvey

Please test again and tell me if the issues are gone now.

user3264

2009-09-09 23:46

  ~09483

I did a quick test and this seems to resolve the issue completely, but I haven't been through all the iterations I tested before. My users are currently field-testing the survey we are running in lime, so I'll quickly know if the issue is fully resolved.

c_schmitz

c_schmitz

2009-09-10 00:47

administrator   ~09486

Sounds great. If you still find something please re-open.

Issue History

Date Modified Username Field Change
2009-09-04 20:39 user3264 New Issue
2009-09-04 20:39 user3264 Status new => assigned
2009-09-04 20:39 user3264 Assigned To => user372
2009-09-04 20:39 user3264 Build Number => 7561
2009-09-04 20:39 user3264 Browser => firefox, coda preview
2009-09-04 20:39 user3264 Database & DB-Version => mysql 5.081
2009-09-04 20:39 user3264 Operating System (Server) => Linux 2.6.18-028stab060.8
2009-09-04 20:39 user3264 Webserver => apache 2.2.1
2009-09-04 20:39 user3264 PHP Version => 5.2.9
2009-09-04 21:42 user372 Note Added: 09386
2009-09-04 21:43 user372 Status assigned => feedback
2009-09-04 22:38 user3264 Note Added: 09393
2009-09-04 22:38 user3264 File Added: limesurvey_survey_25886(2).csv
2009-09-05 14:58 user372 Note Added: 09401
2009-09-05 14:58 user372 Status feedback => assigned
2009-09-05 14:58 user372 Assigned To user372 => lemeur
2009-09-05 15:00 lemeur Assigned To lemeur => c_schmitz
2009-09-05 15:01 lemeur Note Added: 09403
2009-09-09 22:50 c_schmitz Note Added: 09482
2009-09-09 22:50 c_schmitz File Added: save.php
2009-09-09 22:50 c_schmitz File Added: class.datetimeconverter.php
2009-09-09 22:51 c_schmitz Status assigned => feedback
2009-09-09 23:46 user3264 Note Added: 09483
2009-09-10 00:47 c_schmitz Note Added: 09486
2009-09-10 00:47 c_schmitz Status feedback => resolved
2009-09-10 00:47 c_schmitz Fixed in Version => 1.85+
2009-09-10 00:47 c_schmitz Resolution open => fixed
2009-09-14 20:41 c_schmitz Relationship added has duplicate 03675
2009-09-15 12:30 c_schmitz Status resolved => closed
2009-12-16 05:00 user5876 Tag Attached: survey
2010-10-25 00:18 c_schmitz Category Survey at Runtime => Survey taking
2017-01-18 15:29 DenisChenu Tag Detached: survey