Apple2-IO-RPi/RaspberryPi/apple2driver/handlers/getTime.go

20 lines
320 B
Go
Raw Normal View History

2021-05-30 11:18:39 +00:00
package handlers
import (
"fmt"
"time"
2021-10-11 11:52:24 +00:00
"github.com/tjboldt/ProDOS-Utilities/prodos"
2021-05-30 11:18:39 +00:00
)
func GetTimeCommand() {
fmt.Printf("Sending date/time...\n")
2021-10-11 11:52:24 +00:00
prodosTime := prodos.DateTimeToProDOS(time.Now())
2021-05-30 11:18:39 +00:00
2021-10-11 11:52:24 +00:00
for i := 0; i < len(prodosTime); i++ {
2021-10-30 11:03:18 +00:00
comm.WriteByte(prodosTime[i])
2021-10-11 11:52:24 +00:00
}
2021-05-30 11:18:39 +00:00
fmt.Printf("Send time complete\n")
}