search for: gmtime

Displaying 20 results from an estimated 45 matches for "gmtime".

Did you mean: mtime
2013 Nov 18
0
Use of gmtime() in rsync + multi-thread
Hi, I have a system in which rysnc is being used at multiple times. Since a last 3-4 months we have been observing a crash in rysnc at few instances. I am not able to find out the solution for the same but while debugging the issue in code I found gmtime() being used in "tls.c". It is not suggested to use this function in a multi-threaded environment. Version: rsync 2.6.2 Platform: PPC OS: Linux I don't know whether this a proper mail address to ask the solution but kindly share your views on this problem and let me know if there...
2007 Jun 20
1
NULL ptr dereferences found with Calysto static checker
Hi, I've ran my static checker Calysto on openssh and found the following bug: Possible NULL-ptr deref (vc536): @/work/benchmarks/SOURCES/openssh-4.6p1/moduli.c:173 + ptr gtm returned from gmtime dereferenced without checking (gmtime can return NULL). There are probably more possible NULL-ptr dereferences, but Calysto currently does not check the usage of library functions (for instance, if external library function foo dereferences a pointer, Calysto can't figure that out unless the c...
2006 Apr 02
2
Problem with RSS feed from Rails Recipes
I''m trying to add an RSS feed to my app, and am going through the Rails Recipes chapter on doing so. I get the following error when I request the feed: undefined method `gmtime'' for #<DateTime: 1963061961/800,0,2299161> ... 7: xml.pubDate CGI.rfc1123_date(@posts.first.created_on) Any idea what''s up? Pat
2010 Apr 14
1
[PATCH] Change the date format used in RHEV OVF output
...-git a/lib/Sys/VirtV2V/Target/RHEV.pm b/lib/Sys/VirtV2V/Target/RHEV.pm index 911e5c6..f14c54f 100644 --- a/lib/Sys/VirtV2V/Target/RHEV.pm +++ b/lib/Sys/VirtV2V/Target/RHEV.pm @@ -543,10 +543,7 @@ sub create_guest $memsize = int($memsize / 1024); # Generate a creation date - my $now = gmtime(); - my $vmcreation = sprintf("%02d/%02d/%d %02d:%02d:%02d", - $now->mday(), $now->mon() + 1, $now->year() + 1900, - $now->hour(), $now->min(), $now->sec()); + my $vmcreation = _format_time(gmtime()); m...
2019 Oct 03
2
[PATCH] Avoiding Dereferencing of NULL pointer
....c +++ b/moduli.c @@ -153,12 +153,14 @@ static int qfileout(FILE * ofile, u_int32_t otype, u_int32_t otests, u_int32_t otries, u_int32_t osize, u_int32_t ogenerator, 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
2017 Feb 25
3
v2.2.28: patches (to use libressl 2.4.5) and test error (strftime)
t_strftime and variants now .......................................... : ok test-time-util.c:123: Assert failed: strcmp(t_strftime(RFC2822_FMT, gmtime(&ts)), exp) == 0 test-time-util.c:124: Assert failed: strcmp(t_strfgmtime(RFC2822_FMT, ts), exp) == 0 t_strftime and variants fixed timestamp .............................. : FAILED timings 0 ............................................................ : ok -------------- next part ------...
2012 Oct 03
3
2.4-beta fixes for MinGW
...{ -------------- next part -------------- --- icecast-2.3.99.0/src/fserve.c.orig 2012-10-02 14:52:41 +0400 +++ icecast-2.3.99.0/src/fserve.c 2012-10-02 15:31:11 +0400 @@ -560,6 +560,7 @@ time_t now; int strflen; struct tm result; + struct tm *gmtime_result; off_t endpos = rangenumber+new_content_len-1; char *type; @@ -567,8 +568,18 @@ endpos = 0; } time(&now); +#if !defined(_WIN32) + gmtime_result = gmtime_r(&now, &result) +#else + /* gmtim...
2017 Feb 26
1
v2.2.28: patches (to use libressl 2.4.5) and test error (strftime)
...re: What OS is this? OS 10.12.3 with Xcode 8.2.1 and the official clang 3.9.0 re: test-time-util.c t_strftime and variants now .......................................... : ok Info: 'Thu, 08 Dec 2016 18:42:16 +0100' test-time-util.c:124: Assert failed: strcmp(t_strftime(RFC2822_FMT, gmtime(&ts)), exp) == 0 Info: 'Thu, 08 Dec 2016 18:42:16 +0100' test-time-util.c:126: Assert failed: strcmp(t_strfgmtime(RFC2822_FMT, ts), exp) == 0 t_strftime and variants fixed timestamp .............................. : FAILED timings 0 ..................................................
1999 Apr 08
0
Keep-timestamp-in-`get'-patch for smbclient in samba-2.0.3
...le)size, lname)); @@ -538,6 +576,36 @@ if (newhandle) { close(handle); + + /* s.n. Tue Apr 6 22:18:17 1999 */ + if (timestamp) { +#if 0 /* Unused */ + /* Works fine for NT/and linux samba-2.0.3 server, but + Win98 returns garbage a_time, m_time (Win95 not tested). + ( Using gmtime() is correct here ? ) + printf("a:%ld m:%ld\n", a_time, m_time); + printf("a:%s m:%s\n", ctime(&a_time), ctime(&m_time)); */ + utb.actime = mktime(gmtime(&a_time)); + utb.modtime = mktime(gmtime(&m_time)); +#else + uint16 attribute = aDIR |...
2007 Jan 27
1
Memory leaks in backgroundrb
...nt in the process. It also has references to 691 workers! In case there might be some problems with my worker here''s its full code: class DrillReminderWorker < BackgrounDRb::Worker::RailsBase def do_work(args) logger.info "DrillReminderSender started" t = Time.now.gmtime tsec = t.sec + t.min*60 + t.hour*60*60 logger.info "utc seconds: #{tsec}" User.find_all_to_send_drill_reminder(tsec).each do |u| Notification.deliver_drill_reminder(u) u.update_attributes!( :drill_notification_last_send => TimeUtils.nowf ) en...
2011 Sep 17
1
[PATCH] hivexml: Do not print null input times
...s, 0 will always be a complete + * absence of data. */ #define WINDOWS_TICK 10000000LL @@ -182,6 +186,9 @@ filetime_to_8601 (int64_t windows_ticks) time_t t; struct tm *tm; + if (windows_ticks == 0LL) + return NULL; + t = windows_ticks / WINDOWS_TICK - SEC_TO_UNIX_EPOCH; tm = gmtime (&t); if (tm == NULL) -- 1.7.6
2007 Aug 02
0
[LLVMdev] Debug info for conditionally defined variables?
Hi, I have this piece of code: tm = local ? localtime(&curr) : gmtime(&curr); if (!tm) return NULL; which translates into something like: ---------------------------------------------- entry: %iftmp.0 = alloca %struct.tm*, align 8 %tm = alloca %struct.tm*, align 8 ... // Declares iftmp.0 as iftmp.0 call void @llvm.dbg.declare( { }* %iftmp....
2005 Mar 14
2
Dovecot 64-bit and Pine error
Hi all, I compiled a 64-bit Dovecot stable (13-03-2005) version on a Solaris 9 box with gcc 3.4.2. OpenSSL and libiconv are compiled 64-bit also. The configure I use: export CPPFLAGS="-m64 -I/var/tmp/openssl/include" export LDFLAGS="-m64 -L/var/tmp/openssl/lib" ./configure \ --prefix=/opt/dovecot \ --sysconfdir=/etc/opt/dovecot
2005 Feb 18
1
creating POSIXct dates in C
...be if we were in GMT // how do we convert this time to our timezone // taking into account that the offset is not // constant, since daylight savings time // will shift the offset by an hour // for certain times printf("%d\n",(double)localtime_posix); // now convert it to gmtime gmtime_r(&localtime_posix, &utc_tm); utc_posix = mktime(&utc_tm); // this still prints 0 // how do I convert it to a utc time // representing 1970-01-01 in EST ?? printf("%d\n",(double)utc_posix); } > R.Version() $platform [1] "i686-pc-linux-gnu" $...
2015 Sep 12
10
[Bug 2464] New: Adding timestamp to debug messages (log.c:do_log)
https://bugzilla.mindrot.org/show_bug.cgi?id=2464 Bug ID: 2464 Summary: Adding timestamp to debug messages (log.c:do_log) Product: Portable OpenSSH Version: 7.1p1 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 Component: Miscellaneous Assignee:
2015 Sep 12
10
[Bug 2464] New: Adding timestamp to debug messages (log.c:do_log)
https://bugzilla.mindrot.org/show_bug.cgi?id=2464 Bug ID: 2464 Summary: Adding timestamp to debug messages (log.c:do_log) Product: Portable OpenSSH Version: 7.1p1 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 Component: Miscellaneous Assignee:
2008 Sep 10
3
Write Asterisk CDR MySQL records to multiple servers
Hi to all, I actually have an asterisk server configured to write CDR mysql records in the same machine (localhost), but I want to write this records to another machine also in mysql at the same time, It is possible? It means that I want save the records in both machines. Thanks in advance. Ricardo Melendez -------------- next part -------------- An HTML attachment was scrubbed... URL:
2000 Jul 20
4
RFC: System and time support functions in R
...ins, hours, day of month, month, year, day of week, day of year). (I think it also needs to record the timezone used.) Then we can have R functions as vectorized wrappers for the POSIX functions (not necesarily with these names) time (say Sys.date): date() as a POSIXtime variable. localtime / gmtime: convert POSIXtime to POSIXtm (local TZ/UTC) mktime: convert POSIXtm to POSIXtime strftime: convert POSIXtm to character string, flexibly. difftime: difference between times in secs. (The wrappers for the last two could handle POSIXtime and POSIXtm objects.)...
2015 Oct 29
2
[Bug 2464] Adding timestamp to debug messages (log.c:do_log)
https://bugzilla.mindrot.org/show_bug.cgi?id=2464 --- Comment #3 from Darren Tucker <dtucker at zip.com.au> --- Created attachment 2741 --> https://bugzilla.mindrot.org/attachment.cgi?id=2741&action=edit Changes as suggested. Diff updated with suggested changes (also, making the timestamp format ISO8601 compliant). That said, what's the use case for this? The timestamps are
2017 Feb 25
0
v2.2.28: patches (to use libressl 2.4.5) and test error (strftime)
On 25 Feb 2017, at 21.11, Ruga <ruga at protonmail.com> wrote: > > t_strftime and variants now .......................................... : ok > > > test-time-util.c:123: Assert failed: strcmp(t_strftime(RFC2822_FMT, gmtime(&ts)), exp) == 0 > > > test-time-util.c:124: Assert failed: strcmp(t_strfgmtime(RFC2822_FMT, ts), exp) == 0 > > > t_strftime and variants fixed timestamp .............................. : FAILED What OS is this? Could you try with the attached patch what it logs? --------...