@@ -878,16 +878,16 @@ std::string SetexCmd::ToRedisProtocol() {
878878 content.reserve (RAW_ARGS_LEN);
879879 RedisAppendLen (content, 4 , " *" );
880880
881- // to pksetexat cmd
882- std::string pksetexat_cmd ( " pksetexat " );
883- RedisAppendLenUint64 (content, pksetexat_cmd .size (), " $" );
884- RedisAppendContent (content, pksetexat_cmd );
881+ // to setex cmd
882+ std::string setex_cmd ( " setex " );
883+ RedisAppendLenUint64 (content, setex_cmd .size (), " $" );
884+ RedisAppendContent (content, setex_cmd );
885885 // key
886886 RedisAppendLenUint64 (content, key_.size (), " $" );
887887 RedisAppendContent (content, key_);
888888 // time_stamp
889889 char buf[100 ];
890- auto time_stamp = time ( nullptr ) + ttl_sec_;
890+ auto time_stamp = ttl_sec_;
891891 pstd::ll2string (buf, 100 , time_stamp);
892892 std::string at (buf);
893893 RedisAppendLenUint64 (content, at.size (), " $" );
@@ -937,16 +937,16 @@ std::string PsetexCmd::ToRedisProtocol() {
937937 content.reserve (RAW_ARGS_LEN);
938938 RedisAppendLen (content, 4 , " *" );
939939
940- // to pksetexat cmd
941- std::string pksetexat_cmd ( " pksetexat " );
942- RedisAppendLenUint64 (content, pksetexat_cmd .size (), " $" );
943- RedisAppendContent (content, pksetexat_cmd );
940+ // to psetex cmd
941+ std::string psetex_cmd ( " psetex " );
942+ RedisAppendLenUint64 (content, psetex_cmd .size (), " $" );
943+ RedisAppendContent (content, psetex_cmd );
944944 // key
945945 RedisAppendLenUint64 (content, key_.size (), " $" );
946946 RedisAppendContent (content, key_);
947947 // time_stamp
948948 char buf[100 ];
949- auto time_stamp = pstd::NowMillis () + ttl_millsec;
949+ auto time_stamp = ttl_millsec;
950950 pstd::ll2string (buf, 100 , time_stamp);
951951 std::string at (buf);
952952 RedisAppendLenUint64 (content, at.size (), " $" );
0 commit comments