mirror of
https://github.com/tjboldt/ProDOS-Utilities.git
synced 2026-04-20 19:16:30 +00:00
Fix DateTimeFromProDOS and tests
This commit is contained in:
@@ -20,7 +20,7 @@ func TestCreateVolume(t *testing.T) {
|
||||
for _, tt := range tests {
|
||||
testname := fmt.Sprintf("%d", tt.blocks)
|
||||
t.Run(testname, func(t *testing.T) {
|
||||
fileName := os.TempDir() + "test-volume.hdv"
|
||||
fileName := os.TempDir() + "/test-volume.hdv"
|
||||
defer os.Remove(fileName)
|
||||
file, err := os.Create(fileName)
|
||||
if err != nil {
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ func DateTimeFromProDOS(buffer []byte) time.Time {
|
||||
year = 1900 + int(twoDigitYear)
|
||||
}
|
||||
|
||||
month := int(buffer[0]>>5 + buffer[1]&1)
|
||||
month := int(buffer[0]>>5 + (buffer[1]&1)<<3)
|
||||
day := int(buffer[0] & 31)
|
||||
hour := int(buffer[3])
|
||||
minute := int(buffer[2])
|
||||
|
||||
Reference in New Issue
Block a user