From 08bebc94e1d59db53e7f3e23985a6cd691dc400b Mon Sep 17 00:00:00 2001 From: Ben Lubar Date: Sat, 9 Jan 2016 13:23:42 -0600 Subject: [PATCH] Fix dates being offset by 1 day in legends_plus.xml - Fixes #783 --- scripts/exportlegends.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/exportlegends.lua b/scripts/exportlegends.lua index b8c37efde..cc83dbf5f 100644 --- a/scripts/exportlegends.lua +++ b/scripts/exportlegends.lua @@ -85,7 +85,7 @@ end --create an extra legends xml with extra data, by Mason11987 for World Viewer function export_more_legends_xml() - local julian_day = math.floor(df.global.cur_year_tick / 1200) + 1 + local julian_day = math.floor(df.global.cur_year_tick / 1200) local month = math.floor(julian_day / 28) + 1 --days and months are 1-indexed local day = julian_day % 28 + 1 local year_str = string.format('%0'..math.max(5, string.len(''..df.global.cur_year))..'d', df.global.cur_year)