comparison src/c/urweb.c @ 1372:268d9af9103f

Basis.readUtc
author Adam Chlipala <adam@chlipala.net>
date Tue, 28 Dec 2010 14:51:57 -0500
parents 44a12a321150
children 04bd0d91b74c
comparison
equal deleted inserted replaced
1371:4e5ca2a77a4d 1372:268d9af9103f
3659 3659
3660 uw_Basis_bool uw_Basis_le_time(uw_context ctx, uw_Basis_time t1, uw_Basis_time t2) { 3660 uw_Basis_bool uw_Basis_le_time(uw_context ctx, uw_Basis_time t1, uw_Basis_time t2) {
3661 return !!(uw_Basis_eq_time(ctx, t1, t2) || uw_Basis_lt_time(ctx, t1, t2)); 3661 return !!(uw_Basis_eq_time(ctx, t1, t2) || uw_Basis_lt_time(ctx, t1, t2));
3662 } 3662 }
3663 3663
3664 uw_Basis_time *uw_Basis_readUtc(uw_context ctx, uw_Basis_string s) {
3665 uw_Basis_time *r = uw_Basis_stringToTime(ctx, s);
3666
3667 if (r) {
3668 struct tm tm;
3669 localtime_r(&r->seconds, &tm);
3670 r->seconds -= tm.tm_gmtoff;
3671 }
3672
3673 return r;
3674 }