diff options
Diffstat (limited to 'source3/utils/net_time.c')
-rw-r--r-- | source3/utils/net_time.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/utils/net_time.c b/source3/utils/net_time.c index 510807730e..7375206af6 100644 --- a/source3/utils/net_time.c +++ b/source3/utils/net_time.c @@ -23,7 +23,7 @@ /* return the time on a server. This does not require any authentication */ -static time_t cli_servertime(const char *host, struct in_addr *ip, int *zone) +static time_t cli_servertime(const char *host, struct sockaddr_storage *pss, int *zone) { struct nmb_name calling, called; time_t ret = 0; @@ -35,7 +35,7 @@ static time_t cli_servertime(const char *host, struct in_addr *ip, int *zone) goto done; } - status = cli_connect(cli, host, ip); + status = cli_connect(cli, host, pss); if (!NT_STATUS_IS_OK(status)) { fprintf(stderr,"Can't contact server %s. Error %s\n", host, nt_errstr(status)); goto done; @@ -83,9 +83,9 @@ static const char *systime(time_t t) if (!tm) { return "unknown"; } - - fstr_sprintf(s, "%02d%02d%02d%02d%04d.%02d", - tm->tm_mon+1, tm->tm_mday, tm->tm_hour, + + fstr_sprintf(s, "%02d%02d%02d%02d%04d.%02d", + tm->tm_mon+1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_year + 1900, tm->tm_sec); return s; } @@ -110,8 +110,8 @@ static int net_time_set(int argc, const char **argv) int result; if (t == 0) return -1; - - /* yes, I know this is cheesy. Use "net time system" if you want to + + /* yes, I know this is cheesy. Use "net time system" if you want to roll your own. I'm putting this in as it works on a large number of systems and the user has a choice in whether its used or not */ asprintf(&cmd, "/bin/date %s", systime(t)); |