Skip to content

Commit 76cab5d

Browse files
authored
memory/mysql: remove UTC conversion for timestamps (#622)
Remove incorrect UTC conversion
1 parent c8ce038 commit 76cab5d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

memory/mysql/service.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func (s *Service) AddMemory(ctx context.Context, userKey memory.UserKey, memoryS
148148
}
149149
}
150150

151-
now := time.Now().UTC()
151+
now := time.Now()
152152
mem := &memory.Memory{
153153
Memory: memoryStr,
154154
Topics: topics,
@@ -212,7 +212,7 @@ func (s *Service) UpdateMemory(ctx context.Context, memoryKey memory.Key, memory
212212
return fmt.Errorf("unmarshal memory entry failed: %w", err)
213213
}
214214

215-
now := time.Now().UTC()
215+
now := time.Now()
216216
entry.Memory.Memory = memoryStr
217217
entry.Memory.Topics = topics
218218
entry.Memory.LastUpdated = &now
@@ -253,7 +253,7 @@ func (s *Service) DeleteMemory(ctx context.Context, memoryKey memory.Key) error
253253
args []any
254254
)
255255
if s.opts.softDelete {
256-
now := time.Now().UTC()
256+
now := time.Now()
257257
query = fmt.Sprintf(
258258
"UPDATE %s SET deleted_at = ? WHERE app_name = ? AND user_id = ? AND memory_id = ? AND deleted_at IS NULL",
259259
s.tableName,
@@ -284,7 +284,7 @@ func (s *Service) ClearMemories(ctx context.Context, userKey memory.UserKey) err
284284
// #nosec G201
285285
var err error
286286
if s.opts.softDelete {
287-
now := time.Now().UTC()
287+
now := time.Now()
288288
query := fmt.Sprintf(
289289
"UPDATE %s SET deleted_at = ? WHERE app_name = ? AND user_id = ? AND deleted_at IS NULL",
290290
s.tableName,

0 commit comments

Comments
 (0)