@@ -888,16 +888,16 @@ std::string SetexCmd::ToRedisProtocol() {
888888 content.reserve (RAW_ARGS_LEN);
889889 RedisAppendLen (content, 4 , " *" );
890890
891- // to pksetexat cmd
892- std::string pksetexat_cmd ( " pksetexat " );
893- RedisAppendLenUint64 (content, pksetexat_cmd .size (), " $" );
894- RedisAppendContent (content, pksetexat_cmd );
891+ // to setex cmd
892+ std::string setex_cmd ( " setex " );
893+ RedisAppendLenUint64 (content, setex_cmd .size (), " $" );
894+ RedisAppendContent (content, setex_cmd );
895895 // key
896896 RedisAppendLenUint64 (content, key_.size (), " $" );
897897 RedisAppendContent (content, key_);
898898 // time_stamp
899899 char buf[100 ];
900- auto time_stamp = time ( nullptr ) + ttl_sec_;
900+ auto time_stamp = ttl_sec_;
901901 pstd::ll2string (buf, 100 , time_stamp);
902902 std::string at (buf);
903903 RedisAppendLenUint64 (content, at.size (), " $" );
@@ -947,16 +947,16 @@ std::string PsetexCmd::ToRedisProtocol() {
947947 content.reserve (RAW_ARGS_LEN);
948948 RedisAppendLen (content, 4 , " *" );
949949
950- // to pksetexat cmd
951- std::string pksetexat_cmd ( " pksetexat " );
952- RedisAppendLenUint64 (content, pksetexat_cmd .size (), " $" );
953- RedisAppendContent (content, pksetexat_cmd );
950+ // to psetex cmd
951+ std::string psetex_cmd ( " psetex " );
952+ RedisAppendLenUint64 (content, psetex_cmd .size (), " $" );
953+ RedisAppendContent (content, psetex_cmd );
954954 // key
955955 RedisAppendLenUint64 (content, key_.size (), " $" );
956956 RedisAppendContent (content, key_);
957957 // time_stamp
958958 char buf[100 ];
959- auto time_stamp = pstd::NowMillis () + ttl_millsec;
959+ auto time_stamp = ttl_millsec;
960960 pstd::ll2string (buf, 100 , time_stamp);
961961 std::string at (buf);
962962 RedisAppendLenUint64 (content, at.size (), " $" );
0 commit comments