/ Check-in [edd2cb00]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Added additional testcases for julianday calculations with midnight boundary for UTC time. (CVS 5209)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: edd2cb00ae606858d8ae138c69eee7821b8cd6ea
User & Date: shane 2008-06-12 05:16:15
Context
2008-06-12
12:38
Copy the latest VFS changes into the OS/2 implementation. This is a blind edit - I have no way to compile or test OS/2. (CVS 5210) check-in: b60508cc user: drh tags: trunk
05:16
Added additional testcases for julianday calculations with midnight boundary for UTC time. (CVS 5209) check-in: edd2cb00 user: shane tags: trunk
02:24
Added x86_64 version of hwtime function. Ticket #3156. (CVS 5208) check-in: 0729f5c3 user: shane tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/date.test.

     7      7   #    May you find forgiveness for yourself and forgive others.
     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   # This file implements regression tests for SQLite library.  The
    12     12   # focus of this file is testing date and time functions.
    13     13   #
    14         -# $Id: date.test,v 1.27 2008/05/20 14:01:59 shane Exp $
           14  +# $Id: date.test,v 1.28 2008/06/12 05:16:15 shane Exp $
    15     15   
    16     16   set testdir [file dirname $argv0]
    17     17   source $testdir/tester.tcl
    18     18   
    19     19   # Skip this whole file if date and time functions are omitted
    20     20   # at compile-time
    21     21   #
................................................................................
   446    446     {2007-01-01 12:59:59}
   447    447   datetest 13.5 {strftime('%Y-%m-%d %H:%M:%f', '2007-01-01 12:59:59.6')} \
   448    448     {2007-01-01 12:59:59.600}
   449    449   datetest 13.6 {strftime('%Y-%m-%d %H:%M:%S', '2007-01-01 23:59:59.6')} \
   450    450     {2007-01-01 23:59:59}
   451    451   datetest 13.7 {strftime('%Y-%m-%d %H:%M:%f', '2007-01-01 23:59:59.6')} \
   452    452     {2007-01-01 23:59:59.600}
          453  +
          454  +# Test for issues reported by BareFeet <list.sql@tandb.com.au> on mailing list
          455  +# SELECT datetime(julianday('2008-06-12','utc'), 'localtime') should give 2008-06-12 00:00:00
          456  +do_test date-13.8 {
          457  +  execsql {
          458  +    SELECT datetime(julianday('2008-06-12','utc'), 'localtime')
          459  +  }
          460  +} {{2008-06-12 00:00:00}}
          461  +# SELECT date(julianday('2008-06-12', 'utc'), 'localtime') should give 2008-06-12
          462  +do_test date-13.9 {
          463  +  execsql {
          464  +    SELECT date(julianday('2008-06-12','utc'), 'localtime')
          465  +  }
          466  +} {2008-06-12}
   453    467   
   454    468   finish_test