Skip to content

Commit b3bc6df

Browse files
committed
session: fix test timestamp
Before we add the SQL implementation of the store, we fix this timestamp to be a more realistic number. This is needed since in sqlite, timestamps are serialised as strings and golang actually cant parse the string for the current timestamp back into a time.Time. This is the error that will be encountered: `parsing time "99999-01-01 00:00:00 +0000 UTC" as "2006-01-02 15:04:05.999999999 -0700 MST": cannot parse "9-01-01 00:00:00 +0000 UTC" as "-"`
1 parent 306519f commit b3bc6df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

session/store_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ func reserveSession(db Store, label string,
362362

363363
return db.NewSession(
364364
context.Background(), label, opts.sessType,
365-
time.Date(99999, 1, 1, 0, 0, 0, 0, time.UTC),
365+
time.Date(9999, 1, 1, 0, 0, 0, 0, time.UTC),
366366
"foo.bar.baz:1234",
367367
WithDevServer(),
368368
WithPrivacy(PrivacyFlags{ClearPubkeys}),

0 commit comments

Comments
 (0)