andmarti1424 / sc-im

sc-im - Spreadsheet Calculator Improvised -- An ncurses spreadsheet program for terminal
Other
4.86k stars 207 forks source link

.xlsx export moves dates back by one day. #722

Closed DanielDowling1 closed 2 years ago

DanielDowling1 commented 2 years ago

Just exported a spreadsheet from .sc to .xlsx and it set all the dates back by one day. Not sure if it's because of my locale. I'm in Australia (GMT+8) and use %d/%m/%Y date formatting. Opening the exported file in Excel reveals all cells containing dates showing dates a day before the date shown on sc-im. Attached example files Sample.tar.gz

andmarti1424 commented 2 years ago

@DanielDowling1 please try re setting this configuration variable:

'tm_gmtoff' [default -10800 seconds] set gmtoffset used for converting datetimes to localtime.

andmarti1424 commented 2 years ago

@DanielDowling1, could you try it?

DanielDowling1 commented 2 years ago

Thanks for your help. I don't really understand why, but the command that ended up working was sc-im --tm_gmtoff=115200 [filename] With the GMT offset set to +32 hours, I can export to .xlsx without time shifts.