summaryrefslogtreecommitdiffstats
path: root/generic/tclClock.c
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2017-01-10 22:44:30 (GMT)
committersebres <sebres@users.sourceforge.net>2017-01-10 22:44:30 (GMT)
commit9ece7c7e6960bda4940f6b550d3522be072a1092 (patch)
tree4b03deccddc827f2270a58e5a84f607f7d60add3 /generic/tclClock.c
parent5d100ec32832dcd2eb49c5e734a2664e1f240c41 (diff)
downloadtcl-9ece7c7e6960bda4940f6b550d3522be072a1092.zip
tcl-9ece7c7e6960bda4940f6b550d3522be072a1092.tar.gz
tcl-9ece7c7e6960bda4940f6b550d3522be072a1092.tar.bz2
several missing scan tokens added, test cases extended and fixed;
token "%s" used for seconds only (time zone independent), additionally "%Es" token added for local seconds (zone dependent seconds);
Diffstat (limited to 'generic/tclClock.c')
-rw-r--r--generic/tclClock.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/generic/tclClock.c b/generic/tclClock.c
index 28a484f..a3a9332 100644
--- a/generic/tclClock.c
+++ b/generic/tclClock.c
@@ -87,8 +87,6 @@ static int ClockConfigureObjCmd(ClientData clientData,
static void GetYearWeekDay(TclDateFields *, int);
static void GetGregorianEraYearDay(TclDateFields *, int);
static void GetMonthDay(TclDateFields *);
-static void GetJulianDayFromEraYearWeekDay(TclDateFields *, int);
-static void GetJulianDayFromEraYearMonthDay(TclDateFields *, int);
static int WeekdayOnOrBefore(int, int);
static int ClockClicksObjCmd(
ClientData clientData, Tcl_Interp *interp,
@@ -2266,7 +2264,7 @@ GetMonthDay(
*----------------------------------------------------------------------
*/
-static void
+MODULE_SCOPE void
GetJulianDayFromEraYearWeekDay(
TclDateFields *fields, /* Date to convert */
int changeover) /* Julian Day Number of the Gregorian
@@ -2319,7 +2317,7 @@ GetJulianDayFromEraYearWeekDay(
*----------------------------------------------------------------------
*/
-static void
+MODULE_SCOPE void
GetJulianDayFromEraYearMonthDay(
TclDateFields *fields, /* Date to convert */
int changeover) /* Gregorian transition date as a Julian Day */
@@ -2415,7 +2413,7 @@ GetJulianDayFromEraYearMonthDay(
*----------------------------------------------------------------------
*/
-static void
+MODULE_SCOPE void
GetJulianDayFromEraYearDay(
TclDateFields *fields, /* Date to convert */
int changeover) /* Gregorian transition date as a Julian Day */
@@ -3169,9 +3167,11 @@ ClockScanObjCmd(
+ ( yySeconds % SECONDS_PER_DAY );
}
- if (ConvertLocalToUTC(clientData, interp, &yydate, opts.timezoneObj,
- GREGORIAN_CHANGE_DATE) != TCL_OK) {
- goto done;
+ if (info->flags & (CLF_ASSEMBLE_SECONDS|CLF_ASSEMBLE_JULIANDAY|CLF_LOCALSEC)) {
+ if (ConvertLocalToUTC(clientData, interp, &yydate, opts.timezoneObj,
+ GREGORIAN_CHANGE_DATE) != TCL_OK) {
+ goto done;
+ }
}
/* Increment UTC seconds with relative time */