aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix-data-service/branch-updated-emails.scm2
-rw-r--r--guix-data-service/model/git-branch.scm4
-rw-r--r--tests/model-git-branch.scm3
3 files changed, 5 insertions, 4 deletions
diff --git a/guix-data-service/branch-updated-emails.scm b/guix-data-service/branch-updated-emails.scm
index 5f412eb..246ba53 100644
--- a/guix-data-service/branch-updated-emails.scm
+++ b/guix-data-service/branch-updated-emails.scm
@@ -53,7 +53,7 @@
"NULL"
x-git-newrev)
git-repository-id
- (date->string date "~4"))
+ date)
(unless (string=? "0000000000000000000000000000000000000000"
x-git-newrev)
diff --git a/guix-data-service/model/git-branch.scm b/guix-data-service/model/git-branch.scm
index 8dec755..5af7218 100644
--- a/guix-data-service/model/git-branch.scm
+++ b/guix-data-service/model/git-branch.scm
@@ -13,12 +13,12 @@
conn
(string-append
"INSERT INTO git_branches (name, commit, git_repository_id, datetime) "
- "VALUES ($1, $2, $3, $4) "
+ "VALUES ($1, $2, $3, to_timestamp($4)) "
"ON CONFLICT DO NOTHING")
(list name
commit
git-repository-id
- datetime)))
+ (date->string datetime "~s"))))
(define (git-branches-for-commit conn commit)
(define query
diff --git a/tests/model-git-branch.scm b/tests/model-git-branch.scm
index f9b6206..f015cba 100644
--- a/tests/model-git-branch.scm
+++ b/tests/model-git-branch.scm
@@ -1,4 +1,5 @@
(define-module (test-model-git-branch)
+ #:use-module (srfi srfi-19)
#:use-module (srfi srfi-64)
#:use-module (guix-data-service database)
#:use-module (guix-data-service model git-repository)
@@ -18,7 +19,7 @@
"master"
"test-commit"
id
- (strftime "%c" (gmtime (current-time)))))
+ (current-date)))
#t)
#:always-rollback? #t))))