Return-Path: X-Original-To: apmail-ofbiz-dev-archive@www.apache.org Delivered-To: apmail-ofbiz-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 38041104A9 for ; Tue, 1 Apr 2014 08:28:23 +0000 (UTC) Received: (qmail 65764 invoked by uid 500); 1 Apr 2014 08:28:22 -0000 Delivered-To: apmail-ofbiz-dev-archive@ofbiz.apache.org Received: (qmail 65737 invoked by uid 500); 1 Apr 2014 08:28:22 -0000 Mailing-List: contact dev-help@ofbiz.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ofbiz.apache.org Delivered-To: mailing list dev@ofbiz.apache.org Received: (qmail 65729 invoked by uid 99); 1 Apr 2014 08:28:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Apr 2014 08:28:22 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [209.85.219.50] (HELO mail-oa0-f50.google.com) (209.85.219.50) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Apr 2014 08:28:18 +0000 Received: by mail-oa0-f50.google.com with SMTP id i7so11004921oag.9 for ; Tue, 01 Apr 2014 01:27:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=kkaUu17AgIMw4bo3gEd1B7l/EUmew/R03PZDur/SgaA=; b=FGxSq9OQXgOzmfANMLeywqM3L8296F/hfzUogJA2CY1juY8Svy4NxeJR1UZu/UxoRZ wk7IP5J2n/7rkYCkkK4phtQHpGBzIwnCIwS01kMXKiYE8+JiJbDwx/1EgfUb1oWOWpri 0lRQ88dhcQ7q4wVipIacO+B+Ih2IpIpeUb9g2BJdZ9UnLfVAIDsOomG1/NJG5O3e5w7v LmAecg5C+EKpXXOpCCCbjFDbZIfC9JCMB8lJ4eazBortkH23Dc24D3v5NHOHh7UslB6z O2ztP4DlotRULQQDjqsXdxHVL/bzIcpdA/aJAcQ7tEOSbr+bGKUz/mOgX9Wy5bUD0SiJ WWlg== X-Gm-Message-State: ALoCoQnlqwB6nvGYkhi3lFVr4xaFmyTYxh5zYQ+MEoqL4t9gxSXXNXUgY+tZnQ5pOVEBs0CW69IF MIME-Version: 1.0 X-Received: by 10.182.124.66 with SMTP id mg2mr14278010obb.9.1396340877410; Tue, 01 Apr 2014 01:27:57 -0700 (PDT) Received: by 10.76.94.197 with HTTP; Tue, 1 Apr 2014 01:27:57 -0700 (PDT) In-Reply-To: References: Date: Tue, 1 Apr 2014 09:27:57 +0100 Message-ID: Subject: Re: Birthday's Change From: Rupert Howell To: "dev@ofbiz.apache.org" Content-Type: multipart/alternative; boundary=f46d0444ed6dfbce4604f5f6f11a X-Virus-Checked: Checked by ClamAV on apache.org --f46d0444ed6dfbce4604f5f6f11a Content-Type: text/plain; charset=ISO-8859-1 My birth date is my birth date wherever I am in the world - it is not relative. My passport doesn't change as I travel through Timezones. Yet if I view my passport information is OFBiz it will change, Dates need to be viewed as dates and be totally independent of timezones. I cannot think of a single reason why you would want to be specific with dates. If you do want to be specific and have them change as to where you view them from - you'd just use Timestamps. On 1 April 2014 09:12, Pierre Smits wrote: > Rupert, > > You are right when you don't want to be to specific. But if you are > specific and precise then a birthday needs to have a time zone associated. > > Remember it is not the birthday itself that shifts, but your viewpoint of > it when changing locations (meaning time zones). > > Regarding. > > Pierre Smits > > *ORRTIZ.COM * > Services & Solutions for Cloud- > Based Manufacturing, Professional > Services and Retail & Trade > http://www.orrtiz.com > > > On Tue, Apr 1, 2014 at 10:04 AM, Pierre Smits >wrote: > > > Hmm. > > > > Digging a bit deeper I see that birthday is persisted as a date. So that > > shouldn't be creating issues. > > > > > > Pierre Smits > > > > *ORRTIZ.COM * > > Services & Solutions for Cloud- > > Based Manufacturing, Professional > > Services and Retail & Trade > > http://www.orrtiz.com > > > > > > On Tue, Apr 1, 2014 at 10:00 AM, Pierre Smits >wrote: > > > >> Rupert, > >> > >> A date should not be stored as a date-time, but as a date. This appears > >> throughout the entire spectrum of apps where dates are intended. Over > 600 > >> entity fields are designated as date-time, 18 entity fields are > designated > >> as date and 8 as time. > >> > >> Regards, > >> > >> Pierre Smits > >> > >> *ORRTIZ.COM * > >> Services & Solutions for Cloud- > >> Based Manufacturing, Professional > >> Services and Retail & Trade > >> http://www.orrtiz.com > >> > >> > >> On Tue, Apr 1, 2014 at 9:46 AM, Rupert Howell < > ruperthowell@provolve.com>wrote: > >> > >>> There's a definite problem with the way the dates are displayed in > OFBiz. > >>> If you enter a birthday with your local timezone set to UTC, then > change > >>> the timezone to -12, the birthday changes to the previous day. This is > >>> clearly wrong and is really apparent if you have your Server Timezone > set > >>> to GB. If the birthday is within BST (April - October) and you are in > GMT > >>> (Nov - March) they all appear incorrectly and vice versa. > >>> > >>> Ultimately this is caused by line 977 UtilDateTime > >>> > >>> f.setTimeZone(tz); > >>> > >>> Can anyone think of a legitimate reason why a date would have a > timezone > >>> applied? A date is a date. January 1st is January 1st no matter where > in > >>> the world you are. I would have thought if you want a date to be > timezone > >>> dependent you'd use a Timestamp. > >>> > >>> I could patch line 666 of ModelFormField but I think it would be better > >>> to > >>> actually change the UtilDateTime method.. > >>> -- > >>> Rupert Howell > >>> > >>> Provolve Ltd > >>> Front Office, Deale House, 16 Lavant Street, Petersfield, GU32 3EW, UK > >>> > >>> t: 01730 267868 / m: 079 0968 5308 > >>> e: ruperthowell@provolve.com > >>> w: http://www.provolve.com > >>> > >> > >> > > > -- Rupert Howell Provolve Ltd Front Office, Deale House, 16 Lavant Street, Petersfield, GU32 3EW, UK t: 01730 267868 / m: 079 0968 5308 e: ruperthowell@provolve.com w: http://www.provolve.com --f46d0444ed6dfbce4604f5f6f11a--