/* $Id$ * $URL$ * * time plugin * * Copyright (C) 2003, 2004 Michael Reinelt * Copyright (C) 2004 The LCD4Linux Team * * This file is part of LCD4Linux. * * LCD4Linux 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, or (at your option) * any later version. * * LCD4Linux 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., 675 Mass Ave, Cambridge, MA 02139, USA. * */ /* * exported functions: * * int plugin_init_time (void) * adds some handy time functions * */ #include "config.h" #include #include #include #include "debug.h" #include "plugin.h" static void my_time(RESULT * result) { double value = time(NULL); SetResult(&result, R_NUMBER, &value); } static void my_strftime(RESULT * result, RESULT * arg1, RESULT * arg2) { char value[256]; time_t t = R2N(arg2); value[0] = '\0'; strftime(value, sizeof(value), R2S(arg1), localtime(&t)); SetResult(&result, R_STRING, value); } static void my_stftime_tz(RESULT * result, RESULT * arg1, RESULT * arg2, RESULT * arg3) { char value[256] = ""; time_t t = R2N(arg2); char *tz = R2S(arg3); char *old_tz; old_tz = getenv("TZ"); /* * because the next setenv() call may overwrite that string, we * duplicate it here */ if (old_tz) { old_tz = strdup(old_tz); } setenv("TZ", tz, 1); tzset(); strftime(value, sizeof(value), R2S(arg1), localtime(&t)); if (old_tz) { setenv("TZ", old_tz, 1); } else { unsetenv("TZ"); } tzset(); free(old_tz); SetResult(&result, R_STRING, value); } int plugin_init_time(void) { /* register some basic time functions */ AddFunction("time", 0, my_time); AddFunction("strftime", 2, my_strftime); AddFunction("strftime_tz", 3, my_stftime_tz); return 0; } void plugin_exit_time(void) { /* empty */ } an-tables.git/log/?id=76b8385450942bdc03bf77f627f0b509015113bd&showmsg=1&follow=1'>root/dvb-t/sk-Namestovo (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2015-01-18COM 7 and Local TV Updatessilid16-17/+236
This update adds the COM7 HD mux to some regions and Oxford and Sheffield Local muxes. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
2015-01-11dvb-t scan tablesAdam Laurie1-6/+6
Hi Oliver, That's great - here is the frequency patch, tested with current (repo) version of tvheadend - all channels receiving OK including HD. Unfortunately, it didn't fix my original problem of picons not being picked up, but I guess the names are related to frequency etc., not just channel name as it works fine on all my satellite channels.... On to my next quest, I guess!... :) cheers & thanks again, Adam -- Adam Laurie Tel: +44 (0) 20 7993 2690 Suite 7 61 Victoria Road Surbiton Surrey mailto:adam@algroup.co.uk KT6 4JX http://rfidiot.org Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
2015-01-11Sirius-5.0E: complete update based on kingofsat.net dataOlli Salonen1-78/+111
2014-12-21dtv-scan-tables: update dvb-t/au-BrisbaneBrian Burch1-2/+2
Update dvb-t/au-Brisbane as per Brian Burch's bug report on Ubuntu Launchpad: https://bugs.launchpad.net/ubuntu/+source/dtv-scan-tables/+bug/1393280 Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com>
2014-12-21updateOlliver Schinagl1-9/+9
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
2014-11-30dtv-scan-tables: fix the DNA muxes in Finland to DVB-T2Olli Salonen34-102/+102
All of the DNA muxes in Finland are DVB-T2, not DVB-T. Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
2014-11-30dtv-scan-tables: add mux H to stations transmitting it in FinlandOlli Salonen6-30/+60
The new mux H is being broadcasted by Digita from 6 stations in Finland. Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
2014-11-10Delete DVBv3 comments from DVBv5 scan filesJonathan McCrohan494-496/+0
Probably should have happened as part of 06e54ff. Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com>