Project

General

Profile

Revision f4a16f5b src/libs/plugins/parsers/swift/swift940.c

View differences:

src/libs/plugins/parsers/swift/swift940.c
979 979
  unsigned int bleft;
980 980
  int d1, d2, d3;
981 981
  int neg;
982
  GWEN_TIME *ti;
982
  GWEN_DATE *dt;
983 983

  
984 984
  p=AHB_SWIFT_Tag_GetData(tg);
985 985
  assert(p);
......
1013 1013
  d2=((p[2]-'0')*10) + (p[3]-'0');
1014 1014
  d3=((p[4]-'0')*10) + (p[5]-'0');
1015 1015

  
1016
  ti=GWEN_Time_new(d1, d2-1, d3, 12, 0, 0, 1);
1017
  assert(ti);
1018
  if (GWEN_Time_toDb(ti, GWEN_DB_GetGroup(data,
1019
                                          GWEN_DB_FLAGS_OVERWRITE_GROUPS,
1020
					  "date"))) {
1021
    DBG_ERROR(AQBANKING_LOGDOMAIN, "Error saving date");
1022
  }
1023
  GWEN_Time_free(ti);
1016
  dt=GWEN_Date_fromGregorian(d1, d2, d3);
1017
  assert(dt);
1018
  GWEN_DB_SetCharValue(data, GWEN_DB_FLAGS_OVERWRITE_VARS, "date", GWEN_Date_GetString(dt));
1019
  GWEN_Date_free(dt);
1024 1020

  
1025 1021
  p+=6;
1026 1022
  bleft-=6;

Also available in: Unified diff