Issue 17222 - Date 4/13/2003
Summary: Date 4/13/2003
Status: CLOSED FIXED
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: OOo 1.1 RC
Hardware: All All
: P3 Trivial with 2 votes (vote)
Target Milestone: ---
Assignee: oc
QA Contact: issues@sc
URL:
Keywords: oooqa
: 26000 39407 (view as issue list)
Depends on:
Blocks:
 
Reported: 2003-07-22 09:51 UTC by Unknown
Modified: 2013-08-07 15:14 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Unknown 2003-07-22 09:51:29 UTC
Does not recognize 4/13/2003 as a valid date. Could not reformat it to like mm 
dd yyyy.
Comment 1 frank 2003-07-22 11:11:05 UTC
Hi,

seems to be a problem with the default language of your installation.

Set the language of the cells to English US and it should work.

I assume you're not using an English US locale. So the entry is not
recognized as valid date format.

Frank
Comment 2 frank 2003-07-22 11:12:46 UTC
For now I set this one to worksforme.

If your system locale is set to English US and the problem persist,
fell free to reopen this Issue.

Frank
Comment 3 Unknown 2003-07-23 03:57:26 UTC
I am using English US as default language. As it turns out only this
particular value is not recognized as a valid date. 
Comment 4 Unknown 2003-07-23 09:50:03 UTC
Just tried this on Mandrake 9.1 and OpenOffice 1.0.2 Calc and it accepts 
4/13/2003 as valid date. This is not the case however on WinXp and OO 1.1RC. 
Comment 5 frank 2003-07-23 09:51:52 UTC
Hi Eike,

can you have a look at this one please ?

Frank
Comment 6 ooo 2003-07-23 11:01:25 UTC
What should I look at?
I simply don't believe that only the particular value of 4/13/2003
isn't recognized as date but others are, and as long as there is no
further information I can't say anything. Things work perfectly well
if either the system's locale (Windows regional settings in this case)
is set to English-US and the OOo
Tools.Options.LanguageSettings.Languages.LanguageOfLocaleSetting is
set to Default, or
Tools.Options.LanguageSettings.Languages.LanguageOfLocaleSetting is
explicitly set to English-US. The only possibility I could come up
with is the cell being formatted as text, but that wouldn't explain
why other values should work.

So, Dokala6566, what are your settings?
Comment 7 Unknown 2003-07-25 05:13:45 UTC
My settings are exactly English-US both in WindowsXP
and OOo.

I experience this on both notebook(DELL Latitude C640
256RAM XP Home) and my home PC(Athlon XP 1600 Nforce1
256RAM XP Pro).
Comment 8 ooo 2003-07-25 09:52:00 UTC
And 4/13/2003 is not recognized as date input but 4/14/2003 entered in
the very same cell is? I have no idea what should cause that, and
nobody else reported that behavior.
Comment 9 Unknown 2003-07-29 04:30:21 UTC
Have you tried it yourself? I have been experiencing this since 1.0.3
and could not believe it myself and hoping that it was just my system
setup. But I have tried it already on two machines with similar
results. However I can confirm that this issue does not exist on 1.0.2
under linux.
Comment 10 Unknown 2003-08-04 08:18:56 UTC
I've noticed this problem in OOo 1.1 RC in Linux.  I'm downloading RC2
now to see if it is still present.

The locale settings make no difference (I usually use English
Australia, but US has the same problem).

The problem is always in April.

While I can't enter the date directly into the cell, I can enter it
via other means, eg. =date_before+1.  It won't show on the screen
correctly, but it will work for calculation purposes.  If I
double-click on the cell it will change to the correct date, but if I
then go to a different sheet and back again it will have reverted back
to the wrong date.

Here are the dates (wrong) and their numerical equiv (correct):

09/04/2004	38086.0
10/04/2004	38087.0
10/04/2004	38088.0
12/04/2004	38089.0
	
08/04/2005	38450.0
09/04/2005	38451.0
09/04/2005	38452.0
11/04/2005	38453.0
	
14/04/2006	38821.0
15/04/2006	38822.0
15/04/2006	38823.0
17/04/2006	38824.0
	
13/04/2007	39185.0
14/04/2007	39186.0
14/04/2007	39187.0
16/04/2007	39188.0
	
11/04/2008	39549.0
12/04/2008	39550.0
12/04/2008	39551.0
14/04/2008	39552.0
	
10/04/2009	39913.0
11/04/2009	39914.0
11/04/2009	39915.0
13/04/2009	39916.0
Comment 11 Unknown 2003-08-13 10:25:02 UTC
Hi pgibbo,

So how was your testing on RC2 and Linux, anything new?

Regards.
dokala
Comment 12 Unknown 2003-08-14 07:43:49 UTC
Hi dokala,

The prob is still present in RC2 and RC3.

I don't have an old OO handy, but StarOffice 6.0 is fine, while
StarOffice 6.1beta1 has the problem too.

Paul.
Comment 13 Rainer Bielefeld 2003-08-15 10:22:38 UTC
Set oooqa because of visible engagement.

First I have a question:
Is it really so that the correct date input English GB is DD/MM/YYYY
and for English US is MM/DD/YYYY?

If I respect this difference all is ok for me with 1.1RC1 german
version WIN98SE.


Rainer
Comment 14 ooo 2003-09-01 18:06:06 UTC
Rainer,

Yes, English GB date order is DMY.

@Pgibbo: does your example mean that if you enter the serialized date
value and then set the cell's number format to date, a wrong date is
displayed? For example in case of the value 38088?
Comment 15 Unknown 2003-09-02 07:35:09 UTC
Yes Eike, that is correct.

While the value displayed is incorrect, all calculations regarding
that cell are correct.

Also, I am able to enter 38088 and convert to a date, however, I
cannot directly enter 11/04/2004 - it formats as text.

When printing it also prints what is on the screen - not the correct
value.
Comment 16 ooo 2003-09-03 14:14:01 UTC
Pgibbo, Dokala,

I tried 4/13/2003 on WinXP and Linux and Solaris with 1.1rc2 and with
different locale settings within OOo, and everything works as
expected. Of course only for locales with MDY order, YMD order as in
en_AU of course doesn't as there is no month 13.

As for the

09/04/2004	38086.0
10/04/2004	38087.0
10/04/2004	38088.0
12/04/2004	38089.0

problem: I tried that (enter numbers and format to date) on both,
WinXP and Linux, using 1.1rc2 with different locales and had no
problem. Also entering 11/04/2004 wasn't a problem at all, not in
en_US and not in en_AU and not in en_GB locale.

So, please, specify:
- your operating system's locale
- the locale of
Tools.Options.LanguageSettings.Language.LanguageOfLocaleSetting
- the locale used in the number format of the cell
Comment 17 Unknown 2003-09-04 16:44:20 UTC
Eike,

I don't think this is a locale issue.

If I set my OS locale, OO locale and cell locale to en_AU I am unable
to enter the date 11/4/2004 (DMY).

If I set my OS, OO and cell locale to en_US I am unable to enter the
date 4/11/2004 (MDY).

There is something about a single day in April each year that it
doesn't like.

I have found an interesting pattern, there are either exactly 364 days
(52 wks) or 371 days (53 wks) between the nuisance dates:

DMY
		
11/4/2004	38088	
10/4/2005	38452	364
16/4/2006	38823	371
15/4/2007	39187	364
13/4/2008	39551	364
12/4/2009	39915	364
11/4/2010	40279	364
10/4/2011	40643	364
15/4/2012	41014	371
14/4/2013	41378	364
13/4/2014	41742	364
12/4/2015	42106	364
10/4/2016	42470	364
16/4/2017	42841	371
15/4/2018	43205	364
14/4/2019	43569	364
12/4/2020	43933	364
4/11/2021	44297	364
Comment 18 ooo 2003-09-04 18:54:06 UTC
What is the output of the 'locale' command? Which Linux distribution
and version exactly? Version of glibc? Any ICU library installed in
system (/usr/lib/libicu*)? If so, is one of them called (start OOo
using strace: strace -o outfile -f soffice) or the ones OOo provides?
Any libraries of older OOo/SO versions in the way (in other words:
reachable via LD_LIBRARY_PATH)? Anything else you can tell me that is
different between your's and other systems and could be responsible?
TZ environment variable set? Try to empty it. Timezone selected?
Comment 19 Unknown 2003-09-05 09:12:54 UTC
voila...

I removed the /etc/localtime link and now I can enter those dates.

Hope this helps.

Paul.
Comment 20 ooo 2003-09-05 13:40:01 UTC
What was that link pointing to?
Comment 21 Unknown 2003-09-06 04:00:16 UTC
Oops... meant to include that in the last post:

/usr/share/zoneinfo/Australia/Perth

As you'd expect, setting TZ:=Australia/Perth also causes the date problem.
Comment 22 ooo 2003-09-08 13:45:31 UTC
Aah, thanks, that was it, now we finally have that reproducible.
Strange enough anyways..

Thank you for cooperating ;-)
Comment 23 niklas.nebel 2003-11-26 16:46:48 UTC
Review done.
Comment 24 ooo 2003-12-05 14:26:50 UTC
Fixed on branch cws_srx645_pp1numfor:

unotools/source/i18n/calendarwrapper.cxx  1.9.52.1
i18npool/source/calendar/calendar_gregorian.cxx  1.21.32.1

What a bummer.. a chain reaction of:
TZ:=Australia/Perth leads to a zoneinfo that contains "WST" as time
zone abbreviation. WST is not unique, usage includes Western Standard
Time (Australia) (UTC+08), Western Brazil Standard Time (UTC-04), and
West Samoa Time (UTC-11). Now ICU (International Components for
Unicode, a library we use) maintains its own time zone data, and
probably for the ambiguity reason does not include a direct reference
to WST, but instead looks up a default zone matching the corresponding
zone offset UTC+08, which happens to be Asia/Shanghai. Now that
zoneinfo says that DST (dayligh saving time) starts on the first
Sunday on or after April 10th at 00:00, which explains the observed
52/53 weeks pattern. Strictly spoken, local times between
2003-04-13T00:00:00 and 2003-04-13T01:00:00 do not exist in that time
zone. Our local time setting method in conjunction with the date input
validating routine had a glitch that setting 2003-04-13T00:00:00
resulted in 2003-04-12T23:00:00 and the validating method observed a
difference between input date and resulting date and said "nono". This
could have happened with any time zone switching DST on at 00:00,
which are quite a few, namely in South America, Asia, and Africa.
Comment 25 ooo 2003-12-08 17:21:38 UTC
Reassign to QA.
Comment 26 oc 2003-12-12 14:14:22 UTC
adjusting resolution to fixed
Comment 27 oc 2003-12-12 14:15:04 UTC
verified in internal build cws_pp1numfor
Comment 28 oc 2004-01-30 10:25:36 UTC
Fix will be available in the forthcomming OOo1.1.1
Comment 29 frank 2004-03-03 08:44:00 UTC
*** Issue 26000 has been marked as a duplicate of this issue. ***
Comment 30 abdul 2005-01-07 06:57:15 UTC
*** Issue 39407 has been marked as a duplicate of this issue. ***
Comment 31 abdul 2005-01-11 04:33:29 UTC
On (Debian) Linux, OOo 1.9.65 exhibits all the behavior reported in Issue 
17222.
Comment 32 abdul 2005-01-11 04:34:27 UTC
*** Issue 39561 has been marked as a duplicate of this issue. ***
Comment 33 michaelrobinson 2005-01-11 06:08:29 UTC
Seems like a simple merge should do.  From an earlier comment:
----------------------------------------
Fixed on branch cws_srx645_pp1numfor:

unotools/source/i18n/calendarwrapper.cxx  1.9.52.1
i18npool/source/calendar/calendar_gregorian.cxx  1.21.32.1
Comment 34 michaelrobinson 2005-01-11 06:43:54 UTC
The version and target milestone for this bug should probably be updated for
query purposes.
Comment 35 frank 2005-01-11 09:33:47 UTC
Hi,

this is not a bug of the 1.9.65 Version build by OpenOffice.org. it seems to be
a problem with the Debian build, so file an Issue at Debian.

This is closed as fixed again. Checked with the Macro from Issue 24082 which is
a follow up of this Issue.

Frank
Comment 36 frank 2005-01-11 09:34:06 UTC
closed fixed
Comment 37 michaelrobinson 2005-01-11 13:38:34 UTC
This *IS* a bug in the 1.9.65 build from OpenOffice.org.  I am running the
official OOo_1.9.m65_native_LinuxIntel_install.tar.gz package downloaded from
OpenOffice.org, and installed with alien.

I just ran the referenced test macro from Issue 24082, and got this error:
"2004-3-28 2:0:0.0  NOT ok, should be 2004-3-28 3:0:0.0"

My system timezone setting is HKT (+0800).

Please reopen this bug for further testing.  Thank you.
Comment 38 frank 2005-01-13 08:48:46 UTC
reopened
Comment 39 frank 2005-01-13 08:49:23 UTC
Hi Eike,

please have a look.

Frank
Comment 40 Martin Hollmichel 2005-01-17 08:48:52 UTC
set target to some more reasonable value.
Comment 41 frank 2005-01-17 09:12:18 UTC
As it's fixed for 1.1.x target should be 2.0.
Comment 42 ooo 2005-02-03 16:11:19 UTC
Xcqmichael,

> I just ran the referenced test macro from Issue 24082, and got this error:
> "2004-3-28 2:0:0.0  NOT ok, should be 2004-3-28 3:0:0.0"
> 
> My system timezone setting is HKT (+0800).

You should have noted the comment in that macro, lining out a preliminary
condition that has to be fulfilled:

REM Run in an European locale that uses DST onsetRule 2004-03-28T02:00+1h,
REM with DST being effective on the machine.

HKT doesn't have a DST onsetRule 2004-03-28T02:00+1h and isn't currently in DST
mode, AFAIK it doesn't use DST at all. Without these conditions the macro MUST
fail and the value "2004-3-28 2:0:0.0" is correct here, even if the macro says
it wasn't.

So where else, except by running the macro under false conditions, do you
encounter this issue?

Eike
Comment 43 ooo 2005-02-09 16:06:22 UTC
Reopening issue 39561 and resetting this issue to it's original values to have a
better overview of what was fixed when and in what version. Please, folks, don't
mess around with the target  milestones, thank you.

setenv TZ Australia/Perth
currently (2005-02-09) exhibits this behavior that 2003-04-13 can't be entered
as a date.
Comment 44 ooo 2005-04-29 20:52:18 UTC
On branch cws_srx645_erpp5a:
i18npool/inc/calendar_gregorian.hxx 1.6.146.1
i18npool/source/calendar/calendar_gregorian.cxx 1.21.26.2.22.1

This is the backported fix of issue 39561, which was verified to work with
OOo1.9.x in February/March this year.

NOTE: to reproduce the behavior described above in
------- Additional comments from er Wed Feb 9 09:06:22 -0700 2005 -------
may be problematic, as you'll have to set the system date back to February, for
example, which I didn't do right now in my networked environment => left to QA ;-)
Comment 45 ooo 2005-05-10 13:40:59 UTC
Reassigning to QA.

re-open issue and reassign to oc@openoffice.org
Comment 46 ooo 2005-05-10 13:41:04 UTC
reassign to oc@openoffice.org
Comment 47 ooo 2005-05-10 13:41:14 UTC
reset resolution to FIXED
Comment 48 oc 2005-05-31 14:07:31 UTC
verified in internal build cws_erpp5a
Comment 49 oc 2005-06-16 09:58:16 UTC
closed because fix available in OOo1.1.5