/[svn]/hopm/branches/1.1.x/src/misc.c
ViewVC logotype

Diff of /hopm/branches/1.1.x/src/misc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 6970 by michael, Sat Dec 19 20:17:46 2015 UTC revision 6971 by michael, Sat Dec 19 20:30:07 2015 UTC
# Line 26  Line 26 
26  #include "misc.h"  #include "misc.h"
27    
28    
29    const char *
30    date_iso8601(time_t lclock)
31    {
32      static char buf[32];
33      static time_t lclock_last;
34    
35      if (!lclock)
36        lclock = time(0);
37    
38      if (lclock_last != lclock)
39      {
40        lclock_last = lclock;
41        strftime(buf, sizeof(buf), "%FT%T%z", localtime(&lclock));
42      }
43    
44      return buf;
45    }
46    
47  /*  /*
48   * Split a time_t into an English-language explanation of how   * Split a time_t into an English-language explanation of how
49   * much time it represents, e.g. "2 hours 45 minutes 8 seconds"   * much time it represents, e.g. "2 hours 45 minutes 8 seconds"

Legend:
Removed from v.6970  
changed lines
  Added in v.6971

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28