comparison src/os/unix/ngx_time.c @ 178:a8ff48d26cca

nginx-0.0.1-2003-11-11-00:09:22 import
author Igor Sysoev <igor@sysoev.ru>
date Mon, 10 Nov 2003 21:09:22 +0000
parents b48066122884
children 9f3a78b06c48
comparison
equal deleted inserted replaced
177:4db54fdbcbe7 178:a8ff48d26cca
1 1
2 #include <ngx_config.h> 2 #include <ngx_config.h>
3 #include <ngx_time.h> 3 #include <ngx_core.h>
4
4 5
5 void ngx_localtime(ngx_tm_t *tm) 6 void ngx_localtime(ngx_tm_t *tm)
6 { 7 {
7 time_t clock = time(NULL); 8 localtime_r(&ngx_cached_time, tm);
8 localtime_r(&clock, tm); 9
9 tm->ngx_tm_mon++; 10 tm->ngx_tm_mon++;
10 tm->ngx_tm_year += 1900; 11 tm->ngx_tm_year += 1900;
11 } 12 }
12 13
13 u_int ngx_msec(void) 14 u_int ngx_msec(void)