aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2025-11-26 04:32:49 -0500
committerB. Watson <urchlay@slackware.uk>2025-11-26 04:32:49 -0500
commitc5f84c999d5c04a32c3d526d16b4d58f456c2a99 (patch)
tree51e9f44fbd75b7faeb80710b26cfccac78e026fc
parent080e54f17ecb4a255332466725c1ce944f39f5c1 (diff)
downloadunalf-c5f84c999d5c04a32c3d526d16b4d58f456c2a99.tar.gz
Use local timezone (less confusing I hope).
-rw-r--r--src/alf.114
-rw-r--r--src/alf.c2
-rw-r--r--src/alf.rst14
3 files changed, 27 insertions, 3 deletions
diff --git a/src/alf.1 b/src/alf.1
index eb5b0b7..c51cd8c 100644
--- a/src/alf.1
+++ b/src/alf.1
@@ -36,7 +36,7 @@ alf \- create Atari 8-bit ALF archives
.
.SH SYNOPSIS
.sp
-alf [\fB\-\-help\fP] [\fB\-a\fP | \fB\-o\fP ] \fIalf\-file\fP \fIfile\fP [\fIfile\fP ...]
+alf [\fB\-\-help\fP] | [\fB\-a\fP | \fB\-o\fP ] \fIalf\-file\fP \fIfile\fP [\fIfile\fP ...]
.SH DESCRIPTION
.sp
\fBalf\fP creates \fIALF\fP archives.
@@ -50,6 +50,12 @@ rewrite of \fBLZ.COM\fP for modern operating systems, with added features.
By default, the \fIalf\-file\fP is created, and the \fIfile\fPs are compressed
and added to it. If \fIalf\-file\fP already existed, it is backed up by adding
a \fB~\fP to the filename.
+.sp
+The \fBALF\fP file format only supports uppercase "8.3" filenames
+(Atari DOS or MS\-DOS style), and does not support subdirectories. The
+filenames you give will be stored in the \fBALF\fP file uppercased
+and truncated to fit the 8.3 scheme. This could result in duplicate
+filenames in the archive, if you\(aqre not careful.
.SH OPTIONS
.INDENT 0.0
.TP
@@ -94,6 +100,12 @@ files are small (usually under 64KB). Compressing a 1.3MB text file
takes 5 seconds on the author\(aqs (rather modest) Intel i7 workstation.
A 50KB file takes 0.2 seconds, which is more typical of the files
you\(aqd actually use this with.
+.sp
+The date/time stamps stored in the archive are the \fBmtime\fPs of
+the files (which is the same time \fBls\fP(1) shows, by default), and
+your local timezone is assumed. Only a 2\-digit year is displayed by
+\fBunalf\fP, but the year stored in the \fIALF\fP file doesn\(aqt have a Y2K
+problem. It does, however, have a Y2108 problem...
.SH COPYRIGHT
.sp
The original AlfCrunch (\fBDZ.COM\fP and \fBLZ.COM\fP) for the Atari 8\-bit
diff --git a/src/alf.c b/src/alf.c
index 63b1d05..12aafad 100644
--- a/src/alf.c
+++ b/src/alf.c
@@ -132,7 +132,7 @@ unsigned long get_msdos_date_time(void) {
int msdos_year;
u16 ms_date, ms_time;
- tm = gmtime(&t);
+ tm = localtime(&t);
msdos_year = tm->tm_year + 1900 - 1980;
diff --git a/src/alf.rst b/src/alf.rst
index fbfd2c6..3e998b3 100644
--- a/src/alf.rst
+++ b/src/alf.rst
@@ -21,7 +21,7 @@ create Atari 8-bit ALF archives
SYNOPSIS
========
-alf [**--help**] [**-a** | **-o** ] *alf-file* *file* [*file* ...]
+alf [**--help**] | [**-a** | **-o** ] *alf-file* *file* [*file* ...]
DESCRIPTION
===========
@@ -38,6 +38,12 @@ By default, the *alf-file* is created, and the *file*\s are compressed
and added to it. If *alf-file* already existed, it is backed up by adding
a **~** to the filename.
+The **ALF** file format only supports uppercase "8.3" filenames
+(Atari DOS or MS-DOS style), and does not support subdirectories. The
+filenames you give will be stored in the **ALF** file uppercased
+and truncated to fit the 8.3 scheme. This could result in duplicate
+filenames in the archive, if you're not careful.
+
OPTIONS
=======
@@ -82,6 +88,12 @@ takes 5 seconds on the author's (rather modest) Intel i7 workstation.
A 50KB file takes 0.2 seconds, which is more typical of the files
you'd actually use this with.
+The date/time stamps stored in the archive are the **mtime**\s of
+the files (which is the same time **ls**\(1) shows, by default), and
+your local timezone is assumed. Only a 2-digit year is displayed by
+**unalf**, but the year stored in the *ALF* file doesn't have a Y2K
+problem. It does, however, have a Y2108 problem...
+
COPYRIGHT
=========