Skip to content

Commit

Permalink
add timezone offset
Browse files Browse the repository at this point in the history
  • Loading branch information
haipome committed Apr 20, 2017
1 parent 509717c commit 94bb42e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions marketprice/mp_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ static int read_config_from_json(json_t *root)
printf("load kafka deals config fail: %d\n", ret);
return -__LINE__;
}
ret = read_cfg_int(root, "timezone", &settings.timezone, false, -28800);
if (ret < 0) {
printf("load timezone config fail: %d\n", ret);
return -__LINE__;
}

return 0;
}
Expand Down
1 change: 1 addition & 0 deletions marketprice/mp_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ struct settings {
cli_svr_cfg cli;
kafka_consumer_cfg deals;
redis_sentinel_cfg redis;
int timezone;
};

extern struct settings settings;
Expand Down

0 comments on commit 94bb42e

Please sign in to comment.