From f40771d8833d5d9a1bd9dbb9aa468c9a27360c0a Mon Sep 17 00:00:00 2001 From: Kevin Ryde Date: Sat, 3 Jan 2004 22:25:24 +0000 Subject: [PATCH] (scm_current_time, scm_gettimeofday): Add a comment about setzone/restorezone protection for DOS. --- libguile/stime.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libguile/stime.c b/libguile/stime.c index e792eba08..6bf212210 100644 --- a/libguile/stime.c +++ b/libguile/stime.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2003, 2004 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -180,6 +180,13 @@ SCM_DEFINE (scm_get_internal_run_time, "get-internal-run-time", 0, 0, 0, } #undef FUNC_NAME +/* For reference, note that current-time and gettimeofday both should be + protected against setzone/restorezone changes in another thread, since on + DOS the system time is normally kept as local time, which means TZ + affects the return from current-time and gettimeofday. Not sure if DJGPP + etc actually has concurrent multi-threading, but it seems prudent not to + make assumptions about this. */ + SCM_DEFINE (scm_current_time, "current-time", 0, 0, 0, (void), "Return the number of seconds since 1970-01-01 00:00:00 UTC,\n"