itd/api/set.go
2023-04-20 19:54:58 -07:00

14 lines
236 B
Go

package api
import (
"context"
"time"
"go.elara.ws/itd/internal/rpc"
)
func (c *Client) SetTime(ctx context.Context, t time.Time) error {
_, err := c.client.SetTime(ctx, &rpc.SetTimeRequest{UnixNano: t.UnixNano()})
return err
}