SQLite

Check-in [720b565e2d]
Login

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

Overview
Comment:The "EST" timezone designation is ambiguous. Do not use it in the test scripts. (CVS 1155)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 720b565e2d02344e4d38263f4995dfabc60c0860
User & Date: drh 2004-01-02 15:08:43.000
Context
2004-01-06
00:44
Add the sqlite_current_time variable for testing purposes. (CVS 1156) (check-in: 23fa407d50 user: drh tags: trunk)
2004-01-02
15:08
The "EST" timezone designation is ambiguous. Do not use it in the test scripts. (CVS 1155) (check-in: 720b565e2d user: drh tags: trunk)
13:17
Avoid an assertion fault that can occur with invalid UTF8 on the LENGTH() function. Ticket #548. (CVS 1154) (check-in: 7080fc39ea user: drh tags: trunk)
Changes
Unified 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
# 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.3 2003/12/23 16:34:13 drh Exp $

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

proc datetest {tnum expr result} {
  do_test date-$tnum [subst {
    execsql "SELECT coalesce($expr,'NULL')"













|







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.4 2004/01/02 15:08:43 drh Exp $

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

proc datetest {tnum expr result} {
  do_test date-$tnum [subst {
    execsql "SELECT coalesce($expr,'NULL')"
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
datetest 5.3 {datetime('1994-04-16 05:00:00 -08:30')} {1994-04-15 20:30:00}
datetest 5.4 {datetime('1994-04-16 14:00:00 +11:55')} {1994-04-17 01:55:00}

# localtime->utc and utc->localtime conversions.  These tests only work
# if the localtime is in the US Eastern Time (the time in Charlotte, NC
# and in New York.)
#
if {[clock format 0 -format %Z]=="EST"} {
  datetest 6.1 {datetime('2000-10-29 05:59:00','localtime')}\
      {2000-10-29 01:59:00}
  datetest 6.2 {datetime('2000-10-29 06:00:00','localtime')}\
      {2000-10-29 01:00:00}
  datetest 6.3 {datetime('2000-04-02 06:59:00','localtime')}\
      {2000-04-02 01:59:00}
  datetest 6.4 {datetime('2000-04-02 07:00:00','localtime')}\







|







120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
datetest 5.3 {datetime('1994-04-16 05:00:00 -08:30')} {1994-04-15 20:30:00}
datetest 5.4 {datetime('1994-04-16 14:00:00 +11:55')} {1994-04-17 01:55:00}

# localtime->utc and utc->localtime conversions.  These tests only work
# if the localtime is in the US Eastern Time (the time in Charlotte, NC
# and in New York.)
#
if {[clock scan [clock format 0 -format {%b %d, %Y %H:%M:%S}] -gmt 1]==-18000} {
  datetest 6.1 {datetime('2000-10-29 05:59:00','localtime')}\
      {2000-10-29 01:59:00}
  datetest 6.2 {datetime('2000-10-29 06:00:00','localtime')}\
      {2000-10-29 01:00:00}
  datetest 6.3 {datetime('2000-04-02 06:59:00','localtime')}\
      {2000-04-02 01:59:00}
  datetest 6.4 {datetime('2000-04-02 07:00:00','localtime')}\