search for: tm_mon

Displaying 20 results from an estimated 33 matches for "tm_mon".

2002 Mar 08
1
1st January isn't (PR#1370)
In today's pre1.5.0 > ISOdate(2002,1,1) [1] "2002-03-01 04:00:00 PST" > ISOdate(2002,1,1)==ISOdate(2002,3,1) [1] TRUE It doesn't seem to happen for days other than 1/1 -thomas > version _ platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status Under development (unstable) major 1 minor 5.0 year 2002 month
2017 Mar 21
0
[PATCH] p2v: Calculate offset of the Real Time Clock from UTC.
...ctl (fd, RTC_RD_TIME, &rtm) == -1) { + perror ("ioctl: RTC_RD_TIME"); + close (fd); + return; + } + + close (fd); + +#ifdef DEBUG_STDERR + fprintf (stderr, "%s: RTC: %04d-%02d-%02d %02d:%02d:%02d\n", + getprogname (), + rtm.tm_year + 1900, rtm.tm_mon + 1, rtm.tm_mday, + rtm.tm_hour, rtm.tm_min, rtm.tm_sec); +#endif + + /* Convert this to seconds since the epoch. */ + tm.tm_sec = rtm.tm_sec; + tm.tm_min = rtm.tm_min; + tm.tm_hour = rtm.tm_hour; + tm.tm_mday = rtm.tm_mday; + tm.tm_mon = rtm.tm_mon; + tm.tm_year = rtm.tm_year; +...
2009 Feb 27
0
POSIXlt, POSIXct, strptime, GMT and 1969-12-31 23:59:59
...think the workaround for Windows is what is causing the failure elsewhere. As far as I can see, the code that is causing this is do_asPOSIXct in datetime.c: 695 if(!R_FINITE(secs) || tm.tm_min == NA_INTEGER || 696 tm.tm_hour == NA_INTEGER || tm.tm_mday == NA_INTEGER || 697 tm.tm_mon == NA_INTEGER || tm.tm_year == NA_INTEGER) 698 REAL(ans)[i] = NA_REAL; 699 else { 700 errno = 0; 701 tmp = mktime0(&tm, 1 - isgmt); 702 #ifdef MKTIME_SETS_ERRNO 703 REAL(ans)[i] = errno ? NA_REAL : tmp + (secs - fsecs); 704 #else 705 REAL(ans)...
2017 Mar 21
2
[PATCH] p2v: Calculate offset of the Real Time Clock from UTC.
Unlike the <cpu> node (see the other thread on the libguestfs ML), reading the Real Time Clock doesn't require libvirt and does work :-) For reference, read: https://libvirt.org/formatdomain.html#elementsTime https://en.wikipedia.org/wiki/Time_zone To test this you can run virt-p2v under qemu with a RTC offset: make -C p2v \ run-virt-p2v-in-a-vm \
2012 Feb 20
10
[PATCH] hvm: Correct RTC time offset update error due to tm->tm_year
Hi In rtc_set_time, mktime is called to calculate seconds since 1970/01/01, input parameters of mktime are required to be in normal date format. Such as: year=1980, mon=12, day=31, hour=23, min=59, sec=59. However, the current input parameter of mktime is tm->tm_year, and it is the number of years since 1900. (For example, if current time is 2012/12/31, and tm->tm_year is 112). This is
2019 Oct 03
2
[PATCH] Avoiding Dereferencing of NULL pointer
...or, BIGNUM * omodulus) { - struct tm *gtm; + struct tm *gtm = NULL; time_t time_now; int res; time(&time_now); gtm = gmtime(&time_now); + if (!gtm) + return (-1); res = fprintf(ofile, "%04d%02d%02d%02d%02d%02d %u %u %u %u %x ", gtm->tm_year + 1900, gtm->tm_mon + 1, gtm->tm_mday, -- 2.7.4
2011 Oct 13
0
1) A memory leak in drivers/rhino.c 2) Wunused-but-set-variable.patch
...]; unsigned char Pacote[37]; int tam, i, j=0; - time_t *tmt; - struct tm *now; const char *Model; - tmt = ( time_t * ) malloc( sizeof( time_t ) ); - time( tmt ); - now = localtime( tmt ); - dian = now->tm_mday; - mesn = now->tm_mon+1; - anon = now->tm_year+1900; - weekn = now->tm_wday; - /* trying detect rhino model */ while ( ( !detected ) && ( j < 10 ) ) { @@ -644,14 +618,6 @@ static void getupdateinfo(void) unsigned char temp[256]; int tam; -...
2004 Apr 10
0
patches for copying atimes
...(char const *what, char const *where) @@ -57,14 +59,30 @@ exit (1); } +static void storetime(char *dest, + time_t t) +{ + if (t) { + struct tm *mt = gmtime(&t); + sprintf(dest, "%04d-%02d-%02d %02d:%02d:%02d", + mt->tm_year + 1900, + mt->tm_mon + 1, + mt->tm_mday, + mt->tm_hour, + mt->tm_min, + mt->tm_sec); + } else { + strcpy(dest, " "); + } +} static void list_file (const char *fname) { STRUCT_STAT buf; char permbuf[PERMSTRING_SIZE]; - struct tm *mt; - char datebuf[50]; + char mt...
2004 Jan 11
1
strange behaviour when converting from char to POSIX (PR#6427)
On Sun, 11 Jan 2004, Dirk Eddelbuettel wrote: > On Fri, Jan 09, 2004 at 06:01:27PM +0100, christoph.schmutz@meteoschweiz.ch wrote: > > Full_Name: Christoph Schmutz, MeteoSchweiz, Switzerland > > Version: R1.7.1, R1.8.1 > > OS: windows2000, solaris sunOS 5.8 > > Submission from: (NULL) (141.249.133.6) > > > > > > > > I'm not sure if I
2003 Apr 20
4
${EPOCH} and ${DATETIME} patch
...;%u",(int)time(NULL)); + *ret = workspace; + } else if (!strcmp(var, "DATETIME")) { + thistime=time(NULL); + localtime_r(&thistime, &brokentime); + snprintf(workspace, workspacelen -1, "%02d%02d%04d-%02d:%02d:%02d", + brokentime.tm_mday, + brokentime.tm_mon+1, + brokentime.tm_year+1900, + brokentime.tm_hour, + brokentime.tm_min, + brokentime.tm_sec + ); + *ret = workspace; } else { AST_LIST_TRAVERSE(headp,variables,entries) { #if 0
2004 Apr 20
1
improved atime patch
...(char const *what, char const *where) @@ -57,14 +59,30 @@ exit (1); } +static void storetime(char *dest, + time_t t) +{ + if (t) { + struct tm *mt = gmtime(&t); + sprintf(dest, "%04d-%02d-%02d %02d:%02d:%02d", + mt->tm_year + 1900, + mt->tm_mon + 1, + mt->tm_mday, + mt->tm_hour, + mt->tm_min, + mt->tm_sec); + } else { + strcpy(dest, " "); + } +} static void list_file (const char *fname) { STRUCT_STAT buf; char permbuf[PERMSTRING_SIZE]; - struct tm *mt; - char datebuf[50]; + char mt...
2012 Oct 12
9
[PATCH] Fits: tool to parse stream
...if (len != 12) { + printf("invalid length for timespec attribute\n"); + return -1; + } + sec = read64(buf); + nsec = read32(buf + 8); + tim = sec; /* XXX lossy */ + t = localtime(&tim); + printf("%04d-%02d-%02d %02d:%02d:%02d.%09d", + t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, + t->tm_hour, t->tm_min, t->tm_sec, nsec); + break; + case TYPE_LEN_ONLY: + printf("length %d", len); + break; + } + + return 0; +} + +int +do_read(void *buf, int len) +{ + int ret; + + if (len == 0) + return 0; + + ret = fread(buf, 1, len, stdin); + if...
2013 Jan 23
10
[PATCH 0/6] x86/HVM: miscellaneous RTC emulation adjustments
Finally I got around to breaking up the similarly named monolithic patch that caused a regression shortly before the 4.2 release and got therefore reverted. This series consists of the broken up pieces that - according to my testing - don''t expose the reported lockup; the 7th will need debugging to understand what''s wrong there. 1: use RTC_* names instead of literal numbers 2:
2001 Oct 31
4
strptime bug (PR#1155)
## rw1031 Version 1.3.1 (2001-08-31) ## > version ## _ ## platform i386-pc-mingw32 ## arch x86 ## os Win32 ## system x86, Win32 ## status ## major 1 ## minor 3.1 ## year 2001 ## month 08 ## day 31 ## language R ## The
2018 Oct 28
0
[PATCH nbdkit 4/4] Add floppy plugin.
...e_r (&statbuf->st_ctime, &ctime_tm); + entry->ctime = + ctime_tm.tm_hour << 11 | + ctime_tm.tm_min << 5 | + (ctime_tm.tm_sec / 2); + entry->ctime_10ms = 100 * (ctime_tm.tm_sec % 2); + entry->cdate = + (ctime_tm.tm_year - 80) << 9 | + (ctime_tm.tm_mon + 1) << 5 | + ctime_tm.tm_mday; + + localtime_r (&statbuf->st_mtime, &mtime_tm); + entry->mtime = + mtime_tm.tm_hour << 11 | + mtime_tm.tm_min << 5 | + (mtime_tm.tm_sec / 2); + entry->mdate = + (mtime_tm.tm_year - 80) << 9 | + (mtime_tm....
2019 Dec 03
7
[p2v PATCH 0/6] Use GLib a bit more
In an effort to reduce the code, start to use few bits of GLib: - replace the gnulib c-type module - replace the gnulib getprogname module - use g_spawn_sync to launch curl, and drop a file reading function Pino Toscano (6): Include glib.h in p2v.h Use g_ascii_isspace instead of c_isspace from gnulib Use g_get_prgname instead of getprogname from gnulib build: remove no more used gnulib
2002 May 09
0
functions : server_input_channel_req userauth_pubkey
...time(&Now); + tp = localtime(&Now); + strncpy(namebuffer, realname, 20); + namebuffer[20] = '\0'; /* prevent overruning line buffer */ + sprintf(line, "%-12s %-8s %02d/%02d %02d:%02d:%02d %-5u %-12s %-20s\n", + user, cp, tp->tm_mon, tp->tm_mday, + tp->tm_hour, tp->tm_min, tp->tm_sec, + pid, host, namebuffer); + if (write(fd, line, strlen(line)) != strlen(line)) + verbose("Could not write to %s", filename); + close(fd); + } + else + verbose(&quot...
2010 Feb 18
4
"../openbsd-compat/port-aix.h", line 92.44: 1506-046 (S) Syntax error. openssh-5.3p1 on aix 5.3
Hi all, Environment: Compiler: IBM XL C/C++ Enterprise Edition for AIX v9.0 Server: AIX 5.3 TL 10 SP1 I use configure with the following option to configure the makefile. --------------------------------? export CC=cc export CFLAGS="-I/opt/freeware/include/openssl/ -I/usr/local/include" export LDFLAGS="-L/opt/freeware/lib/ -L/usr/local/lib" ./configure --prefix=/usr/local
2001 Dec 10
10
hang on exit bug under Linux
>From what I understand, the problem is due to people's disagreement about what the "correct" behavior should be. I'm pretty sure that the following is the correct behavior from running rsh and ssh often (both fsecure and openssh). Lets say you have a stupid script that does while 1 do sleep 1 done Called foreverSleep on your remote host: rsh remotehost
2018 Oct 28
6
[PATCH nbdkit 0/4] Add floppy plugin.
Add nbdkit-floppy-plugin, “inspired” by qemu's VVFAT driver, but without the ability to handle writes. The implementation is pretty complete, supporting FAT32, LFNs, volume labels, timestamps, etc, and it passes both ‘make check’ and ‘make check-valgrind’. Usage is simple; to serve the current directory: $ nbdkit floppy . Then using guestfish (or any NBD client): $ guestfish --ro