View Issue Details

IDProjectCategoryView StatusLast Update
16976Bug reportsSurvey participants (Tokens)public2021-03-08 12:29
ReporterPPRI Assigned Togabrieljenik  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version3.25.6 
Summary16976: Date format problem
DescriptionI think Limesurvey's defalut date format is dd.mm.yyyy. If the date format is changed to mm.dd.yyyy, A wrong date(month and day are switched) is being loaded on the sent or reminder sent date field when you try to edit a survey participant token information.

For an example, If 'sent' or 'reimindersent' date was 1.12.2021(Jan. 12 2021), 12.1.2021(Dec. 1 2021) is loaded.

If it was 1.13.2021(Jan. 13 2021), 01-01-1800 is loaded because month 13 doesn't exist.

I believe it's because database date type for 'sent' and 'remindersent' fields are string, not datetime like validfrom or validuntil fields so the personal date format selection is not working correctly.
Steps To Reproduce1. Change the Date Format to mm.dd.yyyy at My Personal Setting.
2. Create a token and send the invitation out.
3. Click 'Edit' on the token.
4. Date/Time field for Sent or Reminder Sent will load the wrong date that month and day are switched.
Additional InformationI have tested it on 3.25.4 (Your hosting server version) and on Version 4.3.33(Your Demo server version) and all have the same problem.
TagsNo tags attached.
Complete LimeSurvey version number (& build)Version 3.25.7+210113
I will donate to the project if issue is resolvedNo
BrowserGoogle Chrome
Database & DB-VersionMS SQL 12.00.6024
Server OS (if known)Windows NT 10.0 build 14393 (Windows Server 2016) AMD64
Webserver software & version (if known)Microsoft-IIS/10.0
PHP Version7.3.11

Relationships

related to 17089 closedgabrieljenik Date format problem 

Activities

PPRI

PPRI

2021-02-09 04:55

reporter   ~62052

My personal setting is dd.mm.yyyy but the date in response page shows the switched month and date, I mean, the month first and date at the startdate and datestamp. I have checked at Version 4.4.0, Version 3.25.11 and Version Version 3.25.10 and all give the switched month and date.
gabrieljenik

gabrieljenik

2021-02-12 16:28

manager   ~62221

PR: https://github.com/LimeSurvey/LimeSurvey/pull/1761
gabrieljenik

gabrieljenik

2021-02-25 19:47

manager   ~62537

Fix committed to 3.x-LTS branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=31210
lime_release_bot

lime_release_bot

2021-03-08 12:29

administrator   ~62878

Fixed in Release 3.25.16+210302

Related Changesets

LimeSurvey: 3.x-LTS 84e7ae05

2021-02-25 19:47:56

gabrieljenik


Committer: GitHub Details Diff
Fixed issue 16976: Date format problem (#1761)

This patch is for the edit tokens screen.
This happens because the dates are somehow double converted (calling 2 times convertToGlobalSettingFormat)

This was already fixed for the invitation sent date. Now doing it for the reminder date.
Affected Issues
16976
mod - application/views/admin/token/tokenform.php Diff File

Issue History

Date Modified Username Field Change
2021-01-13 20:29 PPRI New Issue
2021-01-28 20:21 cdorin Priority none => normal
2021-01-28 20:21 cdorin Status new => confirmed
2021-02-09 04:55 PPRI Note Added: 62052
2021-02-12 16:13 gabrieljenik Issue cloned: 17089
2021-02-12 16:23 gabrieljenik Relationship added related to 17089
2021-02-12 16:28 gabrieljenik Note Added: 62221
2021-02-25 19:47 gabrieljenik Changeset attached => LimeSurvey 3.x-LTS 84e7ae05
2021-02-25 19:47 gabrieljenik Note Added: 62537
2021-02-25 19:47 gabrieljenik Assigned To => gabrieljenik
2021-02-25 19:47 gabrieljenik Resolution open => fixed
2021-02-25 19:48 ollehar Status confirmed => resolved
2021-03-08 12:29 lime_release_bot Note Added: 62878
2021-03-08 12:29 lime_release_bot Status resolved => closed