summaryrefslogtreecommitdiffstats
path: root/generic/tclGetDate.y
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclGetDate.y')
-rw-r--r--generic/tclGetDate.y23
1 files changed, 5 insertions, 18 deletions
diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y
index d6f9b11..e546938 100644
--- a/generic/tclGetDate.y
+++ b/generic/tclGetDate.y
@@ -195,29 +195,12 @@ time : tUNUMBER tMERIDIAN {
yySeconds = 0;
yyMeridian = $4;
}
- | tUNUMBER ':' tUNUMBER '-' tUNUMBER {
- yyHour = $1;
- yyMinutes = $3;
- yyMeridian = MER24;
- yyDSTmode = DSToff;
- yyTimezone = ($5 % 100 + ($5 / 100) * 60);
- ++yyHaveZone;
- }
| tUNUMBER ':' tUNUMBER ':' tUNUMBER o_merid {
yyHour = $1;
yyMinutes = $3;
yySeconds = $5;
yyMeridian = $6;
}
- | tUNUMBER ':' tUNUMBER ':' tUNUMBER '-' tUNUMBER {
- yyHour = $1;
- yyMinutes = $3;
- yySeconds = $5;
- yyMeridian = MER24;
- yyDSTmode = DSToff;
- yyTimezone = ($7 % 100 + ($7 / 100) * 60);
- ++yyHaveZone;
- }
;
zone : tZONE tDST {
@@ -232,6 +215,10 @@ zone : tZONE tDST {
yyTimezone = $1;
yyDSTmode = DSTon;
}
+ | sign tUNUMBER {
+ yyTimezone = -$1*($2 % 100 + ($2 / 100) * 60);
+ yyDSTmode = DSToff;
+ }
;
day : tDAY {
@@ -659,7 +646,7 @@ TclDateerror(
infoPtr->separatrix = "\n";
}
-MODULE_SCOPE int
+int
ToSeconds(
int Hours,
int Minutes,