OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uC-libc/] [time/] [ctime_r.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 199 simons
 
2
#include <time.h>
3
 
4
extern void __tm_conv();
5
extern void __asctime();
6
 
7
char *
8
ctime_r(timep, buf)
9
__const time_t * timep;
10
char * buf;
11
{
12
  struct tm tmb;
13
  struct timezone tz;
14
  time_t offt;
15
 
16
  gettimeofday((void*)0, &tz);
17
 
18
  offt = -tz.tz_minuteswest*60L;
19
 
20
  /* tmb.tm_isdst = ? */
21
  __tm_conv(&tmb, timep, offt);
22
 
23
  __asctime(buf, &tmb);
24
 
25
  return buf;
26
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.