This is only used to load old databases stored with the RDB_OPCODE_EXPIRETIME * opcode. New versions of Redis store using the RDB_OPCODE_EXPIRETIME_MS * opcode. On error -1 is returned, however this could be a valid time, so * to check for loading errors the caller should call rioGetReadError() after * calling this function. */
| 124 | * to check for loading errors the caller should call rioGetReadError() after |
| 125 | * calling this function. */ |
| 126 | time_t rdbLoadTime(rio *rdb) { |
| 127 | int32_t t32; |
| 128 | if (rioRead(rdb,&t32,4) == 0) return -1; |
| 129 | return (time_t)t32; |
| 130 | } |
| 131 | |
| 132 | int rdbSaveMillisecondTime(rio *rdb, long long t) { |
| 133 | int64_t t64 = (int64_t) t; |
no test coverage detected