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

Subversion Repositories or1k

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

Go to most recent revision | 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
 
6
struct tm *
7
localtime(timep)
8
__const time_t * timep;
9
{
10
   static struct tm tmb;
11
   struct timezone tz;
12
   time_t offt;
13
 
14
   gettimeofday((void*)0, &tz);
15
 
16
   offt = -tz.tz_minuteswest*60L;
17
 
18
   /* tmb.tm_isdst = ? */
19
   __tm_conv(&tmb, timep, offt);
20
 
21
   return &tmb;
22
}

powered by: WebSVN 2.1.0

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