Issue 104671

Summary: CSV files with date 1970/01/01 incorrectly loaded as 1969/12/31
Product: Calc Reporter: phasmal <openoffice.org>
Component: open-importAssignee: AOO issues mailing list <issues>
Status: CLOSED IRREPRODUCIBLE QA Contact:
Severity: Trivial    
Priority: P3 CC: elish, gibi, issues, rainerbielefeld_ooo_qa, weigel
Version: OOO310m15Keywords: needmoreinfo, oooqa
Target Milestone: ---   
Hardware: Unknown   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
An example csv file that exposes the 1970->1969 issue none

Description phasmal 2009-09-01 05:03:31 UTC
Open a csv file which contains a date/time field with 1970/01/01 as the date
(the correct date is shown in the preview).  OpenOffice Calc then opens the
spreadsheet view with the corresponding cell showing a date of 1969/12/31.

Note I'm not sure about the version field above, as my OO Help->About says 
"OpenOffice.org 3.0.1 
OOO300m15 (Build 9379)" 
- this is the version in the package avaliable to Ubuntu 9.04 at the time of
submission.
Comment 1 phasmal 2009-09-01 05:06:18 UTC
Created attachment 64469 [details]
An example csv file that exposes the 1970->1969 issue
Comment 2 Rainer Bielefeld 2009-09-01 05:48:20 UTC
I checked with "Ooo 3.1.1 WIN XP DE-multilingual version German UI activated
[OOO310m19 (Build 9420)]" and can confirm the reported effect. Also not
reproducible with "Ooo Dev 3.2.0 multilingual version English UI WIN XP:
[DEV300m53 (Build 9412)]".

@phasmal:
Please contribute information concerning your OS, OOo localization, language
settings, 'CALC -> Calculate -> date' settings, CSV open dialog settings (column
formatting, ...)!
Comment 3 Rainer Bielefeld 2009-09-01 06:02:07 UTC
Oops, of course , I wanted to write:
I checked with "Ooo 3.1.1 WIN XP DE-multilingual version German UI activated
[OOO310m19 (Build 9420)]" and can NOT confirm the reported effect.
Comment 4 phasmal 2009-09-01 06:16:53 UTC
== OS ==
I'm using Ubuntu 9.04 up to date with the latest packages as of 2009-01-01

$uname -a
Linux mcaulifr-desktop 2.6.28-15-generic #49-Ubuntu SMP Tue Aug 18 18:40:08 UTC
2009 i686 GNU/Linux

-> is this sufficient info? if not, what specific info are you after here (and
how do I get at it)

== OOo Localisation, Language Settings ==
In OOo Language Settings->Languages:
- "Language of"->"User interface" = Default
- "Language of"->"Locale setting" = Default
- "Language of"->"Decimal separator key" = true Same as locale setting (.)
- "Language of"->"Default currency" = Default
- "Default language for documents"->"Western" = "English (Australia)"
- "Default language for documents"->"For the current document only" = false
- "Enhanced language support"->"Enabled for Asian languages" = false
- "Enhanced language support"->"Enabled for complex text layout (CTL)" = false

From the command line:
$ locale
LANG=en_AU.UTF-8
LC_CTYPE="en_AU.UTF-8"
LC_NUMERIC="en_AU.UTF-8"
LC_TIME="en_AU.UTF-8"
LC_COLLATE="en_AU.UTF-8"
LC_MONETARY="en_AU.UTF-8"
LC_MESSAGES="en_AU.UTF-8"
LC_PAPER="en_AU.UTF-8"
LC_NAME="en_AU.UTF-8"
LC_ADDRESS="en_AU.UTF-8"
LC_TELEPHONE="en_AU.UTF-8"
LC_MEASUREMENT="en_AU.UTF-8"
LC_IDENTIFICATION="en_AU.UTF-8"
LC_ALL=

== 'CALC -> Calculate -> date' settings ==
- "Iterative references"->"Iterations" = false
- "Date" = "12/30/1899 (default)"
- "Case sensitive" = true
- "Precision as shown" = false
- "Search criteria = and <> must apply to whole cells" = true
- "Enable regular expressions in formulas" = true
- "Automatically find column and row labels" = true
- "formula syntax" = "Calc A1"
- "Decimal places" = 2


== CSV open dialog settings ==
- "Import"->"Character set" = "Unicode (UTF-8)"
- "Import"->"From row" = 1
- "Separator options" = Separated by 
- "Separator options"->"Tab" = false 
- "Separator options"->"Semicolon" = false 
- "Separator options"->"Merge delimiters" = false 
- "Separator options"->"Comma" = true
- "Separator options"->"Space" = false 
- "Separator options"->"Other" = false 
- "Separator options"->"Text delimiter" = " (double quote)
- Fields->Column type is set to "standard" for both columns in the example csv
uploaded


Please advise what other info is required, and how to obtain it.
Comment 5 phasmal 2009-09-01 06:25:32 UTC
I've also tried this with the full ISO format "1970-01-01T12:00:00", with the
same result (loaded and displayed date is "31/12/1969 12:00:00")
Comment 6 Stefan Weigel 2009-09-01 12:49:12 UTC
phasmal,

what is your setting in Tools | Otptions | OpenOffice.org Calc | Calculate | Date ?
Comment 7 phasmal 2009-09-03 08:14:11 UTC
Below as recounted above - are these the settings you're after?

== 'CALC -> Calculate -> date' settings ==
- "Iterative references"->"Iterations" = false
- "Date" = "12/30/1899 (default)"
- "Case sensitive" = true
- "Precision as shown" = false
- "Search criteria = and <> must apply to whole cells" = true
- "Enable regular expressions in formulas" = true
- "Automatically find column and row labels" = true
- "formula syntax" = "Calc A1"
- "Decimal places" = 2
Comment 8 Stefan Weigel 2009-09-03 11:14:29 UTC
Cannot reproduce, tried with

OOo 3.1.1 OOO310m19 on Win2000, vanilla build, (german settings)
OOo 3.0.1 OOO300m15 on Ubuntu 9.04, Ubuntu build, (german settings)
OOo 3.2.0 DEV300m56 on Ubuntu 9.04, vanilla build, (en-US settings)

Comment 9 gibi 2009-09-08 22:15:05 UTC
Cannot reproduce with:
OOo 3.1.1 OOO310m19 Linux X64 on Mandriva , vanilla build, (en-US + langpack FR)
ooo-dev OOO310m16 Linux X64 on Mandriva , vanilla build, (en-US)
Comment 10 peterbobroff 2009-10-13 22:05:40 UTC
Affects me also. WinXP OO3.3.3 build 9420
I have correctly set my date format to 1999-12-23 and this is applied to a new 
spreadsheet except when opening a foreign csv.

The Text Import screen initially shows 1999-12-23 format dates.
Changing Standard to Date YMD does not help.
OO must be recognising the column as a Date column as it is mangling the date 
to a format only used by one backward northern hemisphere country.
The default date format that I have carefully set via File/Templates/Organise 
is being ignored.
Comment 11 Rob Weir 2013-02-02 02:57:42 UTC
This Issue requires more information ('needmoreinfo'), but has not been updated
within the last year. Please provide feedback as requested and re-test with the the latest version of OpenOffice - the problem(s) may already be addressed. 

You can download Apache OpenOffice 3.4.1 from http://www.openoffice.org/download

Please report back the outcome of your testing, so this Issue may be closed or
progressed as necessary - otherwise the issue may be Resolved as Invalid in the
future.
Comment 12 Edwin Sharp 2014-01-10 12:48:28 UTC
Date is correct.
AOO410m1(Build:9750)  -  Rev. 1552994
Rev.1552994
Win 7