aboutsummaryrefslogtreecommitdiffstats
path: root/src/twa_t.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/twa_t.c')
-rw-r--r--src/twa_t.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/twa_t.c b/src/twa_t.c
index cfebb96..2001586 100644
--- a/src/twa_t.c
+++ b/src/twa_t.c
@@ -18,7 +18,7 @@ tw_dt_to_tm (TW_DateTime * tw_dt, struct tm *tm)
tm->tm_hour = tw_dt->tw_hour;
tm->tm_mday = tw_dt->tw_day;
tm->tm_mon = tw_dt->tw_month - 1;
- tm->tm_year = tw_dt->tw_year - 1900;
+ tm->tm_year = le16_to_cpu(tw_dt->tw_year - 1900);
}
@@ -33,7 +33,7 @@ tm_to_tw_dt (struct tm *tm, TW_DateTime * tw_dt)
tw_dt->tw_hour = tm->tm_hour;
tw_dt->tw_day = tm->tm_mday;
tw_dt->tw_month = tm->tm_mon + 1;
- tw_dt->tw_year = tm->tm_year + 1900;
+ tw_dt->tw_year = cpu_to_le16(tm->tm_year + 1900);
}