Skip to content

ExpireTime and PExpireTime should return times instead of durations #2657

Open
@costela

Description

@costela

Expected Behavior

redis.ExpireTime and redis.PExpireTime should return redis.TimeCmd.

Current Behavior

redis.ExpireTime and redis.PExpireTime should return redis.DurationCmd.

Possible Solution

Ideally both functions (intruduced only recently in #2426) would return redis.TimeCmd to avoid the necessary conversion and possible confusion of returning a duration that actually represents an absolute unix timestamp.

This would however break the v9 API 😞

Alternatively, the discrepancy should be clearly explained in the API, warning about the need for conversion.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions