Commit eb0630bb authored by Purves, Murray's avatar Purves, Murray
Browse files

Removing century from year in header

parent 86cfcb16
Pipeline #16722 passed with stages
in 17 minutes and 7 seconds
......@@ -114,7 +114,10 @@ bool ARLDataStream::write_record_header(const ARLRecordHeader& rheader)
{
bool result = false;
radix_line("Write index header: year = " << rheader.year);
// Remove century from year
int year = rheader.year % 100;
radix_line("Write index header: year = " << year);
radix_line(" month = " << rheader.month);
radix_line(" day = " << rheader.day);
radix_line(" hour = " << rheader.hour);
......@@ -124,7 +127,7 @@ bool ARLDataStream::write_record_header(const ARLRecordHeader& rheader)
// Construct index header string
char recordHeader[50];
sprintf(recordHeader, "%2d%2d%2d%2d%2d%2d%2d%4s%4d%14.7E%14.7E", rheader.year,
sprintf(recordHeader, "%2d%2d%2d%2d%2d%2d%2d%4s%4d%14.7E%14.7E", year,
rheader.month, rheader.day, rheader.hour, rheader.ic, rheader.il,
std::stoi(rheader.cgrid.c_str()), rheader.kvar.c_str(), rheader.nexp,
rheader.prec, rheader.var1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment