View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
06409Bug reportsExpression Managerpublic2012-08-16 10:23
Reporterfransmarcelissen Assigned Toc_schmitz  
PriorityhighSeveritypartial_block 
Status closedResolutionfixed 
Product Version2.00RC7 
Target Version2.00RC9Fixed in Version2.00RC9 
Summary06409: default values for date fields are incorrect
Description

When a default value for a date field is defined, it always becomes 01.01.1970

Steps To Reproduce

Define a survey. Define a group. Define a dae field. Define default value 1995-05-15. Run the survey. The value of the field becomes 01.01.1970. Click on the field, and the date picker goes to jan 1980

Additional Information

In early beta versions for 1.92, this happened as well (see http://www.limesurvey.org/nl/forum/design-issues/73715-default-date-based-on-token. In the final version of 1.92 this problem was corrected, but in 2.0RC(7) it happens again.

TagsNo tags attached.
Attached Files
Bug heat8
Complete LimeSurvey version number (& build)120718
I will donate to the project if issue is resolvedNo
Browserfirefox
Database type & versionmysql5.1.61
Server OS (if known)centos 2.6.32-279.
Webserver software & version (if known)Apache/2.2.15 (CentOS)
PHP Version5.3.3

Users monitoring this issue

fransmarcelissen

Activities

TMSWhite

TMSWhite

2012-08-01 16:32

reporter   ~20106

Dates should be added in the survey-specific format. Please try doing that and report back if there is still an issue.

fransmarcelissen

fransmarcelissen

2012-08-01 22:14

reporter   ~20109

Last edited: 2012-08-01 22:21

The survey specific format is dd.mm.yyyy Specifying the default date as 15.05.1952 results in the same error.
However: in #73722 you mentioned: "Dates in default values (or {TOKEN:ATTRIBUTE_X} in your case), need to be in the format yyyy-mm-dd. That is the internal storage representation." Here both don't work.
BTW: this error also happens in the demo survey "Test of EM question attributes"

TMSWhite

TMSWhite

2012-08-03 05:00

reporter   ~20119

The attached survey shows the current behavior in 1.92 and 2.0

In 1.92, default values must be in the format yyyy-mm-dd. However, values passed via the command line must be in the survey-specific format (e.g. mm/dd/yyyy).

This is a problem for 2.0, which uses the '/' character to separate parameters, so perhaps we should force the use of the yyyy-mm-dd format for URL parameters too.

Although this survey works in 1.92, it does not work in 2.0 - the default values a re always 01.01.1970

TMSWhite

TMSWhite

2012-08-03 05:05

reporter   ~20120

Since this includes a date picker problem (shows wrong date), someone else needs to handle it. I suspect this isn't actual an EM-related issue, but rather an issue with date conversions.

fransmarcelissen

fransmarcelissen

2012-08-03 12:31

reporter   ~20132

I think indeed default values better should be survey-independant. That also makes it easier to make multi-language surveys.
Frans

c_schmitz

c_schmitz

2012-08-06 11:19

administrator   ~20216

Thomas, I am not sure where this is a date picker problem? To me it rather looks like the default value is not used at all in 2.0?

TMSWhite

TMSWhite

2012-08-10 00:09

reporter   ~20325

Actually, as long as I use the correct format, the default values are appearing in 2.0

fransmarcelissen

fransmarcelissen

2012-08-10 08:54

reporter   ~20328

Last edited: 2012-08-10 09:25

If I do it, it goes wrong.
I use 05.05.2000 as default value, but in the survey it becomes 01.01.1970 The max and min year is 1900 and 2100
Maybe the format is incorrect, but I tried other formats as well. And also the test survey "Test of EM question attributes " behaves in the same way.
Could there be a difference between your and my system? Maybe the language setting? (I use dutch).
If you want I can send you the login code for the admin so you can see my settings (but I do that only by mail)
Thanks
After writing this I saw there is a new build where this should be corrected. I will try this
Frans

c_schmitz

c_schmitz

2012-08-10 09:09

administrator   ~20330

I fixed a bunch of datetime conversion errors since RC8, I guess because of that it is working now as expected. As I cannot reproduce it anymore I will mark this issue as resolved.

fransmarcelissen

fransmarcelissen

2012-08-10 11:22

reporter   ~20334

In the latest build the value appears to be correct.
What is unclear, however, is that the default date should not be entered in the survey specific format (in my case dd.mm.yyyy) but as yyy-mm-dd. I think this is better, but I thing it should be documented (in the earlier note 20106 TMSWhite reported differently).

c_schmitz

c_schmitz

2012-08-16 10:23

administrator   ~20480

Version 2.00 RC 9 released.

Issue History

Date Modified Username Field Change
2012-07-30 22:56 fransmarcelissen New Issue
2012-07-30 22:56 fransmarcelissen Status new => assigned
2012-07-30 22:56 fransmarcelissen Assigned To => TMSWhite
2012-08-01 16:32 TMSWhite Note Added: 20106
2012-08-01 16:32 TMSWhite Status assigned => feedback
2012-08-01 22:14 fransmarcelissen Note Added: 20109
2012-08-01 22:14 fransmarcelissen Status feedback => assigned
2012-08-01 22:21 fransmarcelissen Note Edited: 20109
2012-08-01 22:29 fransmarcelissen Issue Monitored: fransmarcelissen
2012-08-03 05:00 TMSWhite Note Added: 20119
2012-08-03 05:01 TMSWhite File Added: limesurvey_survey_41517.lss
2012-08-03 05:05 TMSWhite Note Added: 20120
2012-08-03 05:05 TMSWhite Assigned To TMSWhite =>
2012-08-03 05:05 TMSWhite Status assigned => new
2012-08-03 12:31 fransmarcelissen Note Added: 20132
2012-08-04 12:20 Mazi Assigned To => c_schmitz
2012-08-04 12:20 Mazi Status new => assigned
2012-08-06 11:19 c_schmitz Note Added: 20216
2012-08-06 11:19 c_schmitz Assigned To c_schmitz => TMSWhite
2012-08-06 11:19 c_schmitz Status assigned => feedback
2012-08-10 00:09 TMSWhite Note Added: 20325
2012-08-10 08:54 fransmarcelissen Note Added: 20328
2012-08-10 08:54 fransmarcelissen Status feedback => assigned
2012-08-10 08:59 fransmarcelissen Note Edited: 20328
2012-08-10 09:09 c_schmitz Note Added: 20330
2012-08-10 09:09 c_schmitz Status assigned => resolved
2012-08-10 09:09 c_schmitz Fixed in Version => 2.00+
2012-08-10 09:09 c_schmitz Resolution open => fixed
2012-08-10 09:09 c_schmitz Assigned To TMSWhite => c_schmitz
2012-08-10 09:25 fransmarcelissen Note Edited: 20328
2012-08-10 11:22 fransmarcelissen Note Added: 20334
2012-08-12 15:32 c_schmitz Fixed in Version 2.00+ => 2.00RC9
2012-08-15 00:22 c_schmitz Target Version => 2.00RC9
2012-08-16 10:23 c_schmitz Note Added: 20480
2012-08-16 10:23 c_schmitz Status resolved => closed