Created attachment 139675 [details]
Windows 10 64 bit LO 188.8.131.52
I used extension Datetime2 a long time in LO, but in LO 6 i can't use the extension.
with so less info i only can say use timeStampBackup_v1-1-6.oxt
its works for in LO master and LO 6.0
Thank you for reporting the bug.
Unfortunately without clear steps to reproduce it, we cannot track down the origin of the problem.
Please provide a clearer set of step-by-step instructions on how to reproduce the problem.
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the steps are provided
Here by the steps to reproduce:
1) download https://github.com/komma4/DateTime2/blob/master/DateTime2.oxt
2) instal DateTime2.oxt with extension manager
3) choose a cell to make a date field
4) choose run macro by extention "DateTime2/DateTime2" unther my library
5) choose macro name "Datum_Feld" on the right
6) choose run and there is a error
BASIC runtime error.
An exception occurred
The line with the error:
nDateTime_Format_TIME = _
in this block:
' Schluesselwert nicht gefunden: hinzufuegen Format
' format not found - key not returned: add format
If nDateTime_Format_TIME < 0 Then
nDateTime_Format_TIME = _
oFormats.addNew( MYTIMEFORMAT, aLocale )
Let's set to NEW and maybe some macro guru can tell what is going on. Bibisecting is also a solution.
Arch Linux 64-bit
Build ID: 13164cc99dc6184fb2c12e56e9c0dea0d5692eec
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: kde4;
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on March 4th 2018
I can't reproduce it in
Build ID: 2affed9bfd72628549df3049ed9f6e6a30fdb5b8
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3;
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Could it be related to the locale and the locale's format?
(In reply to Xisco Faulí from comment #5)
> I can't reproduce it in
> Version: 184.108.40.206.alpha0+
> Build ID: 2affed9bfd72628549df3049ed9f6e6a30fdb5b8
> CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3;
> Locale: ca-ES (ca_ES.UTF-8); Calc: group
> Could it be related to the locale and the locale's format?
Yep, it works with Catalan locale. vlb can try Tools - Options - Language settings - Languages
> Yep, it works with Catalan locale. vlb can try Tools - Options - Language
> settings - Languages
Yep, it works with a other locale lanquage setting...
Is this solve the problem?
(In reply to vlb from comment #7)
> > Yep, it works with Catalan locale. vlb can try Tools - Options - Language
> > settings - Languages
> Yep, it works with a other locale lanquage setting...
> Is this solve the problem?
Well Xisco can bisect it with Finnish locale to find out what change made it break.
It is a bit of a problem, though, that the extension does not seem actively developed. I recommend to try and contact the author in any case.
(In reply to Buovjaga from comment #8)
> (In reply to vlb from comment #7)
> > > Yep, it works with Catalan locale. vlb can try Tools - Options - Language
> > > settings - Languages
> > Yep, it works with a other locale lanquage setting...
> > Is this solve the problem?
> Well Xisco can bisect it with Finnish locale to find out what change made it
> It is a bit of a problem, though, that the extension does not seem actively
> developed. I recommend to try and contact the author in any case.
Also the locale Dutch didn't work.
Bibisected to the commit referenced below using repo bibisect-win32-6.0. This seems to be a fallout from bug 33689 fix.
Adding Cc: to Laurent BP, please take a look. Eike, also CCing you, since you worked on another similar regression before (bug 114185).
author Laurent BP <firstname.lastname@example.org> 2017-10-08 20:05:34 +0200
committer Eike Rathke <email@example.com> 2017-10-19 22:13:44 +0200
tdf#33689 Accept English syntax keywords in format strings
I cannot reproduce with:
- Version: 220.127.116.11 (x64)
Build ID: f7f06a8f319e4b62f9bc5095aa112a65d2f3ac89
Threads CPU : 2; OS : Windows 6.1; UI Render : par défaut;
Locale : de-DE (fr_FR); Calc: CL
My detailed procedure:
1. Install extension https://github.com/komma4/DateTime2/blob/master/DateTime2.oxt and restart
2. Set German locale as it seems this macro works *only* for this locale (if you use a different locale, you need to modify the code inside the macro as explained in the description of the extension): Tools>Options> Language Settings> Language> Locale setting = German (Germany)
3. Create a new spreadsheet
4. Tools > Macros > Run Macro > LibreOffice Macros > DateTime2 > DateTime2
5. Select Datum_Feld macro and click Run button
date is formatted YYYY-MM-DD (JJJJ-MM-TT with de locale)
I don't know if it is the expected behavior but I got no error message.
If I use a different locale than German, then the behavior will depend on version and locale:
- With LibO6.0 there is an error message
- With previous version, LibO try to apply JJJJ-MM-TT number format in the locale setting, and transform in text what is not recognized. For instance in Dutch J is year, but T means nothing, so format will result in YYYY-MM-"TT"
From my point of view there is an enhancement to warn user that macro does not work as expected.
With 18.104.22.168 in an en-US locale I do not even get the mentioned error with the default "JJJJ-MM-TT" format, just the date is displayed as JJJJ-03-TT, which is logical. In an nl-NL locale I get the error. This is because MYTIMEFORMAT is "HH:MM" but in nl-NL should be "UU:MM". It works well if date format codes are set to "DD-MM-JJJJ" or "JJJJ-MM-DD" and time format codes set to "UU:MM" to match the nl-NL locale.
Original submitter should
a) in the macro module DateTime2_func change the MYDATEFORMAT,
MYTIMEFORMAT and MYTIMESTAMPFORMAT to proper format codes matching
the current work locale, as the extension explains; for nl-NL that
would be the DD-MM-JJJJ or JJJJ-MM-DD date format and UU:MM time
b) at least in Calc maybe rather use the Ctrl+; and Shift+Ctrl+;
shortcuts to insert date and time values (note that for other UI
languages' keyboards the shortcuts may differ)
Not sure at the moment why HH:MM is not accepted instead of UU:MM or if it really should, it is accepted in the UI number formatter dialog and properly converted to UU:MM
(In reply to Eike Rathke from comment #12)
> Original submitter should
> a) in the macro module DateTime2_func change the MYDATEFORMAT,
> MYTIMEFORMAT and MYTIMESTAMPFORMAT to proper format codes matching
> the current work locale, as the extension explains; for nl-NL that
> would be the DD-MM-JJJJ or JJJJ-MM-DD date format and UU:MM time
I have change the func and it works now!
Thanks for help here to solve it.