SQLite

Check-in [edd2cb00ae]
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
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: edd2cb00ae606858d8ae138c69eee7821b8cd6ea
User & Date: shane 2008-06-12 05:16:15.000
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: b60508ccbc user: drh tags: trunk)
05:16
Added additional testcases for julianday calculations with midnight boundary for UTC time. (CVS 5209) (check-in: edd2cb00ae user: shane tags: trunk)
02:24
Added x86_64 version of hwtime function. Ticket #3156. (CVS 5208) (check-in: 0729f5c3d0 user: shane tags: trunk)
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to test/date.test.
1
2
3
4
5
6
7
8
9
10
11
12
13
14

15
16
17
18
19
20
21
1
2
3
4
5
6
7
8
9
10
11
12
13

14
15
16
17
18
19
20
21













-
+







# 2003 October 31
#
# The author disclaims copyright to this source code.  In place of
# a legal notice, here is a blessing:
#
#    May you do good and not evil.
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements regression tests for SQLite library.  The
# focus of this file is testing date and time functions.
#
# $Id: date.test,v 1.27 2008/05/20 14:01:59 shane Exp $
# $Id: date.test,v 1.28 2008/06/12 05:16:15 shane Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl

# Skip this whole file if date and time functions are omitted
# at compile-time
#
446
447
448
449
450
451
452
453














454
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468








+
+
+
+
+
+
+
+
+
+
+
+
+
+

  {2007-01-01 12:59:59}
datetest 13.5 {strftime('%Y-%m-%d %H:%M:%f', '2007-01-01 12:59:59.6')} \
  {2007-01-01 12:59:59.600}
datetest 13.6 {strftime('%Y-%m-%d %H:%M:%S', '2007-01-01 23:59:59.6')} \
  {2007-01-01 23:59:59}
datetest 13.7 {strftime('%Y-%m-%d %H:%M:%f', '2007-01-01 23:59:59.6')} \
  {2007-01-01 23:59:59.600}

# Test for issues reported by BareFeet <list.sql@tandb.com.au> on mailing list
# SELECT datetime(julianday('2008-06-12','utc'), 'localtime') should give 2008-06-12 00:00:00
do_test date-13.8 {
  execsql {
    SELECT datetime(julianday('2008-06-12','utc'), 'localtime')
  }
} {{2008-06-12 00:00:00}}
# SELECT date(julianday('2008-06-12', 'utc'), 'localtime') should give 2008-06-12
do_test date-13.9 {
  execsql {
    SELECT date(julianday('2008-06-12','utc'), 'localtime')
  }
} {2008-06-12}

finish_test