Mercurial > urweb
comparison src/c/urweb.c @ 1984:819756825c8d
Merge in upstream
author | Patrick Hurst <phurst@mit.edu> |
---|---|
date | Fri, 14 Feb 2014 04:00:03 -0500 |
parents | 2b95ecdd94eb |
children | 7075acda4456 |
comparison
equal
deleted
inserted
replaced
1983:0ff4f64b4309 | 1984:819756825c8d |
---|---|
3931 } | 3931 } |
3932 | 3932 |
3933 uw_Basis_time uw_Basis_fromDatetime(uw_context ctx, uw_Basis_int year, uw_Basis_int month, uw_Basis_int day, uw_Basis_int hour, uw_Basis_int minute, uw_Basis_int second) { | 3933 uw_Basis_time uw_Basis_fromDatetime(uw_context ctx, uw_Basis_int year, uw_Basis_int month, uw_Basis_int day, uw_Basis_int hour, uw_Basis_int minute, uw_Basis_int second) { |
3934 struct tm tm = { .tm_year = year - 1900, .tm_mon = month, .tm_mday = day, | 3934 struct tm tm = { .tm_year = year - 1900, .tm_mon = month, .tm_mday = day, |
3935 .tm_hour = hour, .tm_min = minute, .tm_sec = second }; | 3935 .tm_hour = hour, .tm_min = minute, .tm_sec = second }; |
3936 uw_Basis_time r = { timegm(&tm) }; | 3936 uw_Basis_time r = { timelocal(&tm) }; |
3937 return r; | 3937 return r; |
3938 } | 3938 } |
3939 | 3939 |
3940 uw_Basis_int uw_Basis_datetimeYear(uw_context ctx, uw_Basis_time time) { | 3940 uw_Basis_int uw_Basis_datetimeYear(uw_context ctx, uw_Basis_time time) { |
3941 struct tm tm; | 3941 struct tm tm; |