aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_times.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2007-11-15 14:26:36 +0000
committerIgor Sysoev <igor@sysoev.ru>2007-11-15 14:26:36 +0000
commit1d04b14c09ee678a184c0acbd91b532110c02dd9 (patch)
tree3e35af1b9cf6438a23d8f1bf8caba49ceebaffb5 /src/core/ngx_times.c
parenta7e01da1636405988d96dfd2dbb2699241f24bbc (diff)
downloadnginx-1d04b14c09ee678a184c0acbd91b532110c02dd9.tar.gz
nginx-1d04b14c09ee678a184c0acbd91b532110c02dd9.zip
64-bit time_t compatibility
Diffstat (limited to 'src/core/ngx_times.c')
-rw-r--r--src/core/ngx_times.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/ngx_times.c b/src/core/ngx_times.c
index 551e10258..949e0c6f7 100644
--- a/src/core/ngx_times.c
+++ b/src/core/ngx_times.c
@@ -205,16 +205,16 @@ ngx_gmtime(time_t t, ngx_tm_t *tp)
{
ngx_int_t sec, min, hour, mday, mon, year, wday, yday, days;
- days = t / 86400;
+ days = (ngx_int_t) (t / 86400);
/* Jaunary 1, 1970 was Thursday */
wday = (4 + days) % 7;
t %= 86400;
- hour = t / 3600;
+ hour = (ngx_int_t) (t / 3600);
t %= 3600;
- min = t / 60;
- sec = t % 60;
+ min = (ngx_int_t) (t / 60);
+ sec = (ngx_int_t) (t % 60);
/* the algorithm based on Gauss's formula */