]> git.saurik.com Git - redis.git/blobdiff - src/aof.c
use server.unixtime instead of time(NULL) where possible (cluster.c not checked though)
[redis.git] / src / aof.c
index 4d3ce096acea3ae0019ba970c73b5024a1c313a2..3f7cd10ffb87b1da7e4d0039b55c5d3a10c1dca3 100644 (file)
--- a/src/aof.c
+++ b/src/aof.c
@@ -46,7 +46,7 @@ void stopAppendOnly(void) {
 /* Called when the user switches from "appendonly no" to "appendonly yes"
  * at runtime using the CONFIG command. */
 int startAppendOnly(void) {
-    server.aof_last_fsync = time(NULL);
+    server.aof_last_fsync = server.unixtime;
     server.aof_fd = open(server.aof_filename,O_WRONLY|O_APPEND|O_CREAT,0644);
     redisAssert(server.aof_state == REDIS_AOF_OFF);
     if (server.aof_fd == -1) {