SQLite

Check-in Differences
Login

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

Difference From 6833f4aeef4923c3 To cd87e77dd062b6b9

2022-03-06
00:01
Remove a NEVER() associated with sqlite_offset()> (check-in: bf2501e2 user: drh tags: branch-3.38)
2022-03-05
20:20
Fix the 'localtime' modifier in date/time functions so that it preserves fractional seconds. Forum post 2ffbaa2c3fd7fb82. (check-in: 6833f4ae user: drh tags: branch-3.38)
20:12
Fix the 'localtime' modifier in date/time functions so that it preserves fractional seconds. Forum post 2ffbaa2c3fd7fb82. (check-in: 1c875b07 user: drh tags: trunk)
19:46
Increase the version number to 3.38.1. (check-in: cd87e77d user: drh tags: branch-3.38)
19:39
Cherry-pick all bug fix changes since the 3.38.0 release. (check-in: 45a5d5ac user: drh tags: branch-3.38)

Changes to src/date.c.

598
599
600
601
602
603
604
605

606
607
608
609
610
611
612
598
599
600
601
602
603
604

605
606
607
608
609
610
611
612







-
+







    return SQLITE_ERROR;
  }
  p->Y = sLocal.tm_year + 1900 - iYearDiff;
  p->M = sLocal.tm_mon + 1;
  p->D = sLocal.tm_mday;
  p->h = sLocal.tm_hour;
  p->m = sLocal.tm_min;
  p->s = sLocal.tm_sec + (p->iJD%1000)*0.001;
  p->s = sLocal.tm_sec;
  p->validYMD = 1;
  p->validHMS = 1;
  p->validJD = 0;
  p->rawS = 0;
  p->validTZ = 0;
  p->isError = 0;
  return SQLITE_OK;

Changes to test/date.test.

535
536
537
538
539
540
541
542
543
544

545
546
547
535
536
537
538
539
540
541



542

543
544







-
-
-
+
-


datetest 17.2 {datetime(2457828)} {2017-03-15 12:00:00}
datetest 17.3 {datetime(2457828,'start of day')} {2017-03-15 00:00:00}
datetest 17.4 {datetime(2457828,'start of month')} {2017-03-01 00:00:00}
datetest 17.5 {datetime(2457828,'start of year')} {2017-01-01 00:00:00}
datetest 17.6 {datetime(37,'start of year')} NULL
datetest 17.7 {datetime(38,'start of year')} {-4712-01-01 00:00:00}

# 2022-03-04 https://sqlite.org/forum/forumpost/2ffbaa2c3fd7fb82
# The 'localtime' modifier should preserve fractional seconds.
#

datetest 18.1 {strftime('%f',1.234,'unixepoch','localtime')} {01.234}

finish_test