mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
firewalldb: canonicalize action timestamps to UTC
Normalize action timestamp handling to UTC during KV and SQL marshalling so migration validation behaves consistently on Postgres backends outside UTC. This also allows the action time comparison helper to use the same timezone normalization approach as the other migration paths.
This commit is contained in:
parent
7b3916596f
commit
d9d5432a10
2 changed files with 3 additions and 3 deletions
|
|
@ -421,7 +421,7 @@ func unmarshalAction(ctx context.Context, db SQLActionQueries,
|
|||
RPCMethod: dbAction.RpcMethod,
|
||||
RPCParamsJson: dbAction.RpcParamsJson,
|
||||
},
|
||||
AttemptedAt: dbAction.CreatedAt,
|
||||
AttemptedAt: dbAction.CreatedAt.UTC(),
|
||||
State: ActionState(dbAction.ActionState),
|
||||
ErrorReason: dbAction.ErrorReason.String,
|
||||
}, nil
|
||||
|
|
|
|||
|
|
@ -1264,7 +1264,7 @@ func paramsFromAction(action *Action,
|
|||
StructuredJsonData: []byte(action.StructuredJsonData),
|
||||
RpcMethod: action.RPCMethod,
|
||||
RpcParamsJson: action.RPCParamsJson,
|
||||
CreatedAt: action.AttemptedAt,
|
||||
CreatedAt: action.AttemptedAt.UTC(),
|
||||
ActionState: int16(action.State),
|
||||
ErrorReason: sqldb.SQLStr(action.ErrorReason),
|
||||
}
|
||||
|
|
@ -1484,7 +1484,7 @@ func marshalDBAction(ctx context.Context, sqlTx *sqlcmig6.Queries,
|
|||
RPCMethod: dbAction.RpcMethod,
|
||||
RPCParamsJson: dbAction.RpcParamsJson,
|
||||
},
|
||||
AttemptedAt: dbAction.CreatedAt,
|
||||
AttemptedAt: dbAction.CreatedAt.UTC(),
|
||||
State: ActionState(dbAction.ActionState),
|
||||
ErrorReason: dbAction.ErrorReason.String,
|
||||
}, nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue