Return-Path: X-Original-To: apmail-incubator-ooo-users-archive@minotaur.apache.org Delivered-To: apmail-incubator-ooo-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DB285D9EC for ; Fri, 29 Jun 2012 08:08:42 +0000 (UTC) Received: (qmail 93775 invoked by uid 500); 29 Jun 2012 08:08:42 -0000 Delivered-To: apmail-incubator-ooo-users-archive@incubator.apache.org Received: (qmail 93688 invoked by uid 500); 29 Jun 2012 08:08:40 -0000 Mailing-List: contact ooo-users-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ooo-users@incubator.apache.org Delivered-To: mailing list ooo-users@incubator.apache.org Received: (qmail 93673 invoked by uid 99); 29 Jun 2012 08:08:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Jun 2012 08:08:40 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gcaiou-ooo-users@m.gmane.org designates 80.91.229.3 as permitted sender) Received: from [80.91.229.3] (HELO plane.gmane.org) (80.91.229.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Jun 2012 08:08:32 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SkWFM-0003uf-Bn for ooo-users@incubator.apache.org; Fri, 29 Jun 2012 10:08:08 +0200 Received: from aclermont-ferrand-158-1-152-147.w86-207.abo.wanadoo.fr ([86.207.23.147]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 29 Jun 2012 10:08:08 +0200 Received: from alex.thurgood by aclermont-ferrand-158-1-152-147.w86-207.abo.wanadoo.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 29 Jun 2012 10:08:08 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: ooo-users@incubator.apache.org From: Alex Thurgood Subject: Re: Dates changed on entry in database Date: Fri, 29 Jun 2012 10:08:02 +0200 Lines: 40 Message-ID: References: <4FEBDB63.4090509@dreamchaser.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: aclermont-ferrand-158-1-152-147.w86-207.abo.wanadoo.fr User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 In-Reply-To: <4FEBDB63.4090509@dreamchaser.org> X-Virus-Checked: Checked by ClamAV on apache.org On 28/06/2012 06:19, Gary Aitken wrote: Hi Gary, > I have a form connected to a mysql database with a datetime field. > The first time I enter a date for a new record, with the time portion of the field still empty, the day is changed to be one day less. For example, if I enter 2012-06-27 the date is reformatted and changed to 06/26/12. If I then clear out the date and time, and enter the time, the date is set to 01/01/1800. The offset is an old, old bug that has haunted OOo for years and raises its ugly head on a regular basis, then gets forgotten about (or the bug report dismissed), as it doesn't always seem to be reproducible. In the past, I've opened at least one I can definitely remember, but possibly 2 or 3 bug reports for this terrible behaviour, but each time they were closed as unreproducible. There was also a discussion somewhere on the dba OOo mailing lists at one stage, but I guess that could only be found now by trawling the archives of those lists. > If I then try to change the date by deleting it and entering 2012-06-27 again, it always resets to 01/01/1800. What's going on? > > Also, how do I change the default date display for everything in OO as a whole? Under Tools > Options, you can set date handling for Calc, but unfortunately the different modules use different datetime routines/functions for the handling of dates, which is possibly one of the reasons why these problems occur. Another more basic reason might be rounding errors in date calculation within OOo, but I don't know where that could be found in the source code. > > Or if that's not possible, how do I change the date display for a datetime field in a base form? I tried ungrouping the label + datetime field, then ungrouping the datetime field, then doing Format but everything is greyed out. If you are in Form design mode, then you should be able to access the form's controls properties by right mouse button clicking on a field control representing the bound data field, and then setting its "properties" from the context menu. If you can't do this, then either your form is not properly bound to the underlying data, or else it is a bug. Alex --------------------------------------------------------------------- To unsubscribe, e-mail: ooo-users-unsubscribe@incubator.apache.org For additional commands, e-mail: ooo-users-help@incubator.apache.org