diff -ruN nvram-wakeup-0.97-old/Makefile nvram-wakeup-0.97/Makefile --- nvram-wakeup-0.97-old/Makefile 2005-06-06 15:14:10 +0300 +++ nvram-wakeup-0.97/Makefile 2005-06-06 15:23:37 +0300 @@ -13,21 +13,21 @@ PROG = nvram-wakeup PROG_SH = VDR/vdrshutdown -HELPER = rtc time biosinfo guess cat_nvram +HELPER = rtc nvtime biosinfo guess cat_nvram HELPER_SH = guess-helper DOC = README README.mb README.reboot HISTORY nvram-wakeup.conf -BINS = nvram-wakeup rtc time biosinfo guess cat_nvram +BINS = nvram-wakeup rtc nvtime biosinfo guess cat_nvram #SRCS = $(PROG:%=%.c) OBJS = nvram-wakeup.o nvram-wakeup-mb.o bios.o gmt-test.o byteops.o \ nvramops.o guess.o biosinfo.o tools.o readconf.o cat_nvram.o \ - rtc.o time.o + rtc.o nvtime.o HDRS = nvram-wakeup.h GTTXT = guess-helper.mo GTTXTSRC = $(GTTXT:%.mo=%.po) MAN5 = nvram-wakeup.conf.5 MAN8 = nvram-wakeup.8 biosinfo.8 cat_nvram.8 guess-helper.8 guess.8 \ - rtc.8 set_timer.8 time.8 + rtc.8 set_timer.8 nvtime.8 MAN5GZ = $(MAN5:%.5=%.5.gz) MAN8GZ = $(MAN8:%.8=%.8.gz) DEVS = /dev/nvram /dev/rtc /dev/mem @@ -52,7 +52,7 @@ rtc: rtc.o -time: time.o +nvtime: nvtime.o $(OBJS): $(HDRS) diff -ruN nvram-wakeup-0.97-old/nvtime.8 nvram-wakeup-0.97/nvtime.8 --- nvram-wakeup-0.97-old/nvtime.8 1970-01-01 03:00:00 +0300 +++ nvram-wakeup-0.97/nvtime.8 2005-06-06 15:30:48 +0300 @@ -0,0 +1,88 @@ +'\" t +.\" ** The above line should force tbl to be a preprocessor ** +.\" +.\" Man page for NVRAM WakeUp - time +.\" Copyright (C) 2001-2004, Sergei Haller. +.\" +.\" $Id: time.8,v 1.2 2004/07/09 10:05:56 bistr-o-math Exp $ +.\" +.\" This program is free software; you can redistribute it and/or modify +.\" it under the terms of the GNU General Public License as published by +.\" the Free Software Foundation; either version 2 of the License, or +.\" (at your option) any later version. +.\" +.\" This program is distributed in the hope that it wqill be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public License +.\" along with this program; if not, write to the Free Software +.\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +.\" +.TH nvtime 8 "Jul 07 2004" Linux "NVRAM WakeUp" +.SH NAME +nvtime \- Prints the given time in UTC and Local Time in human readable form. +.\" ******************************************************************** +.SH SYNOPSIS +.\" The general command line +.B nvtime +.I time +.\" ******************************************************************** +.SH OPTIONS +.TP +.I time +is the number of seconds since epoch. +.\" ******************************************************************** +.SH DESCRIPTION +.B nvtime +is a helper program from the package +.B nvram-wakeup. +.\" ******************************************************************** +.SH "EXAMPLES" +.RS +.if t \f(CW# nvtime 1089365289\fP +.if n # time 1089365289 +.RE +.RS +.if t \f(CW(time_t) 1089365289\fP +.if n (time_t) 1089365289 +.RE +.RS +.if t \f(CW(local time) Fri Jul 9 11:28:09 2004\fP +.if n (local time) Fri Jul 9 11:28:09 2004 +.RE +.RS +.if t \f(CW(utc/gmt) Fri Jul 9 09:28:09 2004\fP +.if n (utc/gmt) Fri Jul 9 09:28:09 2004 +.RE +.\" ******************************************************************** +.SH HOMEPAGE +http://sf.net/projects/nvram-wakeup/ +.\" ******************************************************************** +.SH AUTHOR +Written by +Sergei Haller . +.\" +.\" ******************************************************************** +.SH "REPORTING BUGS" +Report bugs at the bug tracking system (see HOMEPAGE) or on the mailing list +.B nvram-wakeup-devel@lists.sourceforge.net +.\" +.\" ******************************************************************** +.SH COPYRIGHT +Copyright \(co 2001-2004 Sergei Haller. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA diff -ruN nvram-wakeup-0.97-old/nvtime.c nvram-wakeup-0.97/nvtime.c --- nvram-wakeup-0.97-old/nvtime.c 1970-01-01 03:00:00 +0300 +++ nvram-wakeup-0.97/nvtime.c 2005-06-06 15:22:18 +0300 @@ -0,0 +1,47 @@ +/* + * NVRAM WakeUp + * Copyright (C) 2001-2002, Sergei Haller. + * + * $Id: time.c,v 1.5 2004/06/26 07:21:23 bistr-o-math Exp $ + * + * Contributed by Dr. Werner Fink + * Added some changes/speedups by Dr. Werner Fink and me. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#define CVSREV_time_c \ + "$Id: time.c,v 1.5 2004/06/26 07:21:23 bistr-o-math Exp $" + +#include +#include +#include +int main(int argc, char **argv) { + time_t vdr_abs_time_t; + + if (argc != 2) { + printf("Usage: %s