From 6c358db38be7feb49fc201bf076e71828ef68c7b Mon Sep 17 00:00:00 2001
From: zbigniew <zbigniewsz@gmail.com>
Date: Mon, 19 Jul 2010 16:26:41 -0500
Subject: [PATCH] Correct polarity on gmtoff to tmvec conversions (fixes time->string TZ)
---
posixunix.scm | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/posixunix.scm b/posixunix.scm
index e476828..2fbf528 100644
a
|
b
|
static time_t timegm(struct tm *t) |
370 | 370 | (ptm)->tm_isdst = (C_block_item((v), 8) != C_SCHEME_FALSE)) |
371 | 371 | |
372 | 372 | #define cpy_tmvec_to_tmstc9(ptm, v) \ |
373 | | (((struct tm *)ptm)->tm_gmtoff = C_unfix(C_block_item((v), 9))) |
| 373 | (((struct tm *)ptm)->tm_gmtoff = -C_unfix(C_block_item((v), 9))) |
374 | 374 | |
375 | 375 | #define cpy_tmstc08_to_tmvec(v, ptm) \ |
376 | 376 | (C_set_block_item((v), 0, C_fix(((struct tm *)ptm)->tm_sec)), \ |
… |
… |
static time_t timegm(struct tm *t) |
384 | 384 | C_set_block_item((v), 8, ((ptm)->tm_isdst ? C_SCHEME_TRUE : C_SCHEME_FALSE))) |
385 | 385 | |
386 | 386 | #define cpy_tmstc9_to_tmvec(v, ptm) \ |
387 | | (C_set_block_item((v), 9, C_fix((ptm)->tm_gmtoff))) |
| 387 | (C_set_block_item((v), 9, C_fix(-(ptm)->tm_gmtoff))) |
388 | 388 | |
389 | 389 | #define C_tm_set_08(v) cpy_tmvec_to_tmstc08( &C_tm, (v) ) |
390 | 390 | #define C_tm_set_9(v) cpy_tmvec_to_tmstc9( &C_tm, (v) ) |