Mercurial > hg > nginx-mail
view src/os/unix/ngx_time.c @ 9:77eee314ddbd
Added tag NGINX_0_1_4 for changeset 983306b77348
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Tue, 26 Oct 2004 00:00:00 +0400 |
parents | f0b350454894 |
children | 6f8b0dc0f8dd |
line wrap: on
line source
/* * Copyright (C) Igor Sysoev */ #include <ngx_config.h> #include <ngx_core.h> void ngx_localtime(ngx_tm_t *tm) { #if (HAVE_LOCALTIME_R) time_t now; now = ngx_time(); localtime_r(&now, tm); #else time_t now; ngx_tm_t *t; now = ngx_time(); t = localtime(&now); *tm = *t; #endif tm->ngx_tm_mon++; tm->ngx_tm_year += 1900; }