diff --git a/src/modules/db_flatstore/flat_cmd.c b/src/modules/db_flatstore/flat_cmd.c index fbbb57a0c4d..3b0ecb01919 100644 --- a/src/modules/db_flatstore/flat_cmd.c +++ b/src/modules/db_flatstore/flat_cmd.c @@ -142,7 +142,7 @@ int flat_put(db_res_t* res, db_cmd_t* cmd) break; case DB_DATETIME: - if (fprintf(f, "%u", (unsigned int)cmd->vals[i].v.time) < 0) + if (fprintf(f, "%llu", (unsigned long long)cmd->vals[i].v.time) < 0) goto error; break; diff --git a/src/modules/db_flatstore/km_flatstore.c b/src/modules/db_flatstore/km_flatstore.c index 007d1b83384..b933479ad0e 100644 --- a/src/modules/db_flatstore/km_flatstore.c +++ b/src/modules/db_flatstore/km_flatstore.c @@ -207,7 +207,7 @@ int flat_db_insert(const db1_con_t* h, const db_key_t* k, const db_val_t* v, break; case DB1_DATETIME: - fprintf(f, "%u", (unsigned int)VAL_TIME(v + i)); + fprintf(f, "%llu", (unsigned long long)VAL_TIME(v + i)); break; case DB1_BLOB: