From: Ramkumar Ramachandra Date: Tue, 29 Mar 2011 18:13:08 GMT Subject: [PATCH 1/5] date: Expose the time_to_tm function Message-ID: <1301422392-21177-2-git-send-email-artagnon@gmail.com> In-Reply-To: <1301422392-21177-1-git-send-email-artagnon@gmail.com> Signed-off-by: Ramkumar Ramachandra --- cache.h | 1 + date.c | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/cache.h b/cache.h index f765cf5..76a14c6 100644 --- a/cache.h +++ b/cache.h @@ -834,6 +834,7 @@ enum date_mode { DATE_RAW }; +struct tm *time_to_tm(unsigned long time, int tz); const char *show_date(unsigned long time, int timezone, enum date_mode mode); const char *show_date_relative(unsigned long time, int tz, const struct timeval *now, diff --git a/date.c b/date.c index 00f9eb5..e601a50 100644 --- a/date.c +++ b/date.c @@ -54,7 +54,7 @@ static time_t gm_time_t(unsigned long time, int tz) * thing, which means that tz -0100 is passed in as the integer -100, * even though it means "sixty minutes off" */ -static struct tm *time_to_tm(unsigned long time, int tz) +struct tm *time_to_tm(unsigned long time, int tz) { time_t t = gm_time_t(time, tz); return gmtime(&t); -- 1.7.4.rc1.7.g2cf08.dirty