* Code for getting the remote time
*/
-
int net_time(struct net_context *ctx, int argc, const char **argv)
{
NTSTATUS status;
if (argc > 0 && argv[0]) {
server_name = argv[0];
} else {
- DEBUG(0,("net_time: server name needed!\n"));
- return -1;
+ return net_time_usage(ctx, argc, argv);
}
libnetctx = libnet_context_init();
return -1;
}
- ZERO_ARRAY(timestr);
+ ZERO_STRUCT(timestr);
tm = localtime(&r.generic.out.time);
- sys_strftime(timestr, sizeof(timestr)-1, "%c %Z",tm);
+ strftime(timestr, sizeof(timestr)-1, "%c %Z",tm);
printf("%s\n",timestr);
int net_time_usage(struct net_context *ctx, int argc, const char **argv)
{
- d_printf("net_time_usage: TODO\n");
- return 0;
-}
-
-int net_time_help(struct net_context *ctx, int argc, const char **argv)
-{
- d_printf("net_time_help: TODO\n");
+ d_printf("net time <server> [options]\n");
return 0;
}