We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The result of calling readstat_get_modified_time on the same file is different for Windows and Mac. The code for both platforms is as follows:
#include "readstat.h" struct Context { time_t mdate = 0; }; int handle_metadata(readstat_metadata_t *metadata, void *ctx) { Context* context = (Context*)ctx; context->mdate = readstat_get_modified_time(metadata); return READSTAT_HANDLER_OK; } int main(int argc, char *argv[]) { if (argc != 2) { printf("Usage: %s <filename>\n", argv[0]); return 1; } Context context{}; readstat_error_t error = READSTAT_OK; readstat_parser_t *parser = readstat_parser_init(); readstat_set_metadata_handler(parser, handle_metadata); error = readstat_parse_dta(parser, argv[1], &context); readstat_parser_free(parser); if (error != READSTAT_OK) { printf("Error processing %s: %d\n", argv[1], error); return 1; } printf("Modified date: %ld\n", context.mdate); return 0; }
The output on Windows is:
Modified date: 1031073900
...while the output on Mac is:
Modified date: 1031048700
I'm attaching the sample file. Tested with Readstat 1.1.8. citytemp.dta.zip
The text was updated successfully, but these errors were encountered:
Hi, these two values appear differ by exactly 7 hours. I am guessing it is a time zone issue. Is this difference important?
Sorry, something went wrong.
No branches or pull requests
The result of calling readstat_get_modified_time on the same file is different for Windows and Mac. The code for both platforms is as follows:
The output on Windows is:
...while the output on Mac is:
I'm attaching the sample file. Tested with Readstat 1.1.8.
citytemp.dta.zip
The text was updated successfully, but these errors were encountered: