aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2025-12-02 17:06:20 -0500
committerB. Watson <urchlay@slackware.uk>2025-12-02 17:06:20 -0500
commit65145d492797a8c5f5e95098b49ea4b00f49be4c (patch)
treec853bc5f3d8971107d6bea991f94f7ff089f94d4 /src
parent08a74ca787bd4b528d61953f18b7ea72dead384a (diff)
downloadalftools-65145d492797a8c5f5e95098b49ea4b00f49be4c.tar.gz
unalf: Really fix off-by-one-hour bug. I hope.
Diffstat (limited to 'src')
-rw-r--r--src/alf.c2
-rw-r--r--src/extract.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/alf.c b/src/alf.c
index 9f9ae9d..702837e 100644
--- a/src/alf.c
+++ b/src/alf.c
@@ -108,6 +108,8 @@ unsigned long get_msdos_date_time(void) {
else
tm = localtime(&t);
+ tm->tm_isdst = 0;
+
/* use a 0 timestamp if the year's out of range, unalf will
display it as <none>. */
if(tm->tm_year < 80 || tm->tm_year > 207)
diff --git a/src/extract.c b/src/extract.c
index ebd9a29..b14b321 100644
--- a/src/extract.c
+++ b/src/extract.c
@@ -55,7 +55,7 @@ void set_datetime() {
d = dpeek(alf_hdr_date0);
- tm.tm_isdst = 0;
+ tm.tm_isdst = -1;
tm.tm_sec = (t & 0x1f) << 1;
tm.tm_hour = t >> 11;
if(tm.tm_hour == 24) tm.tm_hour = 0;