itd/api/set.go

14 lines
236 B
Go
Raw Normal View History

2022-04-23 00:12:30 +00:00
package api
import (
2022-05-01 22:22:28 +00:00
"context"
2022-04-23 00:12:30 +00:00
"time"
2023-01-03 06:30:17 +00:00
2023-04-21 02:54:58 +00:00
"go.elara.ws/itd/internal/rpc"
2022-04-23 00:12:30 +00:00
)
2022-05-01 22:22:28 +00:00
func (c *Client) SetTime(ctx context.Context, t time.Time) error {
2023-01-03 06:30:17 +00:00
_, err := c.client.SetTime(ctx, &rpc.SetTimeRequest{UnixNano: t.UnixNano()})
return err
2022-04-23 00:12:30 +00:00
}