Bug 108471 - In a Form Table Control the Default time is not working in Date/Time (time) fields.
Summary: In a Form Table Control the Default time is not working in Date/Time (time) f...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
4.2.5.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Database-Forms
  Show dependency treegraph
 
Reported: 2017-06-12 01:33 UTC by Howard Johnson
Modified: 2019-01-17 08:01 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample database file (12.71 KB, application/vnd.sun.xml.base)
2017-06-12 01:33 UTC, Howard Johnson
Details
Firebird error message (13.60 KB, image/png)
2017-06-13 18:07 UTC, Howard Johnson
Details
Sample database using firebird (10.34 KB, application/vnd.sun.xml.base)
2017-06-13 18:10 UTC, Howard Johnson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Howard Johnson 2017-06-12 01:33:00 UTC
Created attachment 133959 [details]
Sample database file

The Summary/title line above says it all.

To demonstrate this feature open the form in the attachment.  Click on the 4th line in either table control to start a new record. Note that defaults are working for all but the Date/time (Time) field which gets 0:00 rather than the set default.

Contrast this with the fact that defaults do work properly for Time, Date, and Date/Time (Date) type fields.  In addition all of these work properly in Tables and Queries.  It's only Form, Table control, Date/Time (time) fields that don't work properly.

I have tested this both with the embedded HSQLDB 1.8 and with a connected MariaDB 10.1.  The attachment here only uses the embedded HSQLDB database.

Associated issues: I think there are also other related issues with the inability to easily enter dates and times in Table Controls, and will submit as separate issues.  But I note this here because at the same time as someone is working on this they might also want to fix some other related issues.

Note that if you create a table control using the wizard, using an underlying data source with a Date/Time type field, the wizard will create two Table Control columns: a Date/time (Date) and a Date/time (Time).  It's the 2nd of these that is not working properly.

Debian Jessie 8.8-64 w/ cinnamon 2.2.16.

Thanks.
Comment 1 Buovjaga 2017-06-12 11:01:03 UTC
Reproduced with file.

Did you also test with Firebird?

Win 7 Pro 64-bit Version: 5.4.0.0.alpha1+ (x64)
Build ID: d02d52887678cd3d518c19a235bc443c292b3041
CPU threads: 4; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86_64@62-TDF, Branch:MASTER, Time: 2017-05-01_22:53:14
Locale: fi-FI (fi_FI); Calc: CL
Comment 2 Howard Johnson 2017-06-13 18:07:27 UTC
Created attachment 134000 [details]
Firebird error message
Comment 3 Howard Johnson 2017-06-13 18:08:20 UTC
(In reply to Buovjaga from comment #1)
> Reproduced with file.
> 
> Did you also test with Firebird?

I just tested w/ Firebird.  Yes this also happens w/ Firebird, but w/ different error message:

"Error updating the current record

firebird_sdbc error:
*value exceeds the range for valid timestamps
caused by
'isc dsql execute'"
Comment 4 Howard Johnson 2017-06-13 18:10:36 UTC
Created attachment 134001 [details]
Sample database using firebird
Comment 5 Julien Nabet 2018-01-25 09:55:37 UTC
On pc Debian x86-64 with master sources updated yesterday, I could reproduce this.

Just for my information, where do you put default time, date or other?
In table design, default values are empty and I don't find other places.
Comment 6 Alex Thurgood 2019-01-07 15:06:05 UTC
Thought this was a regression, but having tested against 

Version: 4.4.5.2
Build ID: a22f674fd25a3b6f45bdebf25400ed2adff0ff99
Locale : fr_FR.UTF-8
macOS 10.14.2

it seems like this was the beahviour at least back to that version.

Testing earlier versions of LO is complicated on macOS because it requires the presence of the JavaforOSX package which is deprecated.
Comment 7 Alex Thurgood 2019-01-07 15:11:14 UTC
I can also reproduce this in 

Version: 4.2.5.2
Build ID: 61cb170a04bb1f12e77c884eab9192be736ec5f5
Comment 8 Julien Nabet 2019-01-17 08:01:59 UTC
I gave it a try with master sources updated yesterday.
1) Firebird file shows no table for me even if I enable advanced features and no message on console to indicate why.
2) I could reproduce this with hsqldb but and had different messages on console:
warn:tools.datetime:6904:6904:tools/source/datetime/tdate.cxx:102: Date::setDateFromDMY - sure about 0 year? It's not in the calendar
warn:legacy.osl:6072:6072:svx/source/fmcomp/gridctrl.cxx:2120: DbGridControl::SetCurrent : SeekRow failed !
warn:legacy.osl:6072:6072:svtools/source/brwbox/brwbox3.cxx:376: Illegal call here!
Between datetime format in table, datetime format in forms, the different date limits between database types, I'm lost
=> I can't help here, uncc myself