mirror of
https://github.com/tjboldt/Apple2-IO-RPi.git
synced 2024-11-22 17:33:22 +00:00
26 lines
565 B
Go
26 lines
565 B
Go
// Copyright Terence J. Boldt (c)2020-2021
|
|
// Use of this source code is governed by an MIT
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// This file is contains the handler for retrieving the ProDOS timestamp
|
|
// based on the current time
|
|
package handlers
|
|
|
|
import (
|
|
"fmt"
|
|
"time"
|
|
|
|
"github.com/tjboldt/ProDOS-Utilities/prodos"
|
|
)
|
|
|
|
func GetTimeCommand() {
|
|
fmt.Printf("Sending date/time...\n")
|
|
prodosTime := prodos.DateTimeToProDOS(time.Now())
|
|
|
|
for i := 0; i < len(prodosTime); i++ {
|
|
comm.WriteByte(prodosTime[i])
|
|
}
|
|
|
|
fmt.Printf("Send time complete\n")
|
|
}
|