From owner-freebsd-bugs@FreeBSD.ORG Mon Jun 30 12:06:12 2014 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0220BD5 for ; Mon, 30 Jun 2014 12:06:12 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9156A2EE2 for ; Mon, 30 Jun 2014 12:06:12 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s5UC6CGQ059877 for ; Mon, 30 Jun 2014 13:06:12 +0100 (BST) (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 191512] New: /bin/date -j -v-sun returns a Saturday instead of Sunday Date: Mon, 30 Jun 2014 12:06:12 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 9.3-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: chocolate.camera@gmail.com X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2014 12:06:12 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D191512 Bug ID: 191512 Summary: /bin/date -j -v-sun returns a Saturday instead of Sunday Product: Base System Version: 9.3-RELEASE Hardware: i386 OS: Any Status: Needs Triage Severity: Affects Only Me Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: chocolate.camera@gmail.com ## Summary For some specific dates (and maybe time zones) using `date` to get the time= and date of the previous Sunday returns a Saturday instead. ## Steps to reproduce I tried this on Mac OS X 10.9.3, as I do not have a FreeBSD system. I am su= re all steps can be reproduced with FreeBSD, I just cannot instruct you how. 1. In System Preferences > Date & Time, deactivate the setting to set ti= me and date automatically from a remote server. 2. Set you timezone to US/Pacific (Los Angeles, CA; I have not tried with other timezones) and your date and time to **Friday, 2014 March 14, 23:30**. 3. In Terminal, run: date -j -v-sun and take note of the output. 4. Set your time to 1 hour later, i.e. **Saturday, 2014 March 15, 00:30*= *, and run the same command again, taking note of the output. 5. Again, set again your date and time to 1 hour later, i.e. **Saturday, 2014 March 15, 01:30**, and run the same command again, taking note of the output. ## Expected result The date returned should be the same on 3, 4 & 5, only the hour changing (it being the same as the one you set it to, within seconds). I.e.: 3: Sun Mar 9 23:30:00 PST 2014=20=20 4: Sun Mar 9 00:30:00 PST 2014=20=20 5: Sun Mar 9 01:30:00 PST 2014 ## Actual results Only for the moment in the middle, **Saturday, 2014 March 15, from 00:00:00= to 00:59:59**, the command returns the previous Saturday instead of the previo= us Sunday: 3: Sun Mar 9 00:30:00 PST 2014=20=20 4: Sat Mar 8 23:30:00 PST 2014=20=20 5: Sun Mar 9 00:30:00 PST 2014 #Note Probably it has to do with the change to/from Daylight Saving Time, which f= or US/Pacific is **Sunday, March 9, 02:00** and **Sunday, November 2, 2:00**. The command is not requesting the date of today minus 1 week, though, but t= he date of the previous Sunday, so it should return a Sunday irrespective of a= ny change from/to Daylight Saving Time. Don=E2=80=99t trust the "Version" field in this bug report as I do not know= what FreeBSD=E2=80=99s version of `date` Mac OS X 10.9.3 uses. --=20 You are receiving this mail because: You are the assignee for the bug.=