CVS difference for ai12s/ai12-0347-1.txt

Differences between 1.3 and version 1.4
Log of other versions for file ai12s/ai12-0347-1.txt

--- ai12s/ai12-0347-1.txt	2020/01/30 01:56:16	1.3
+++ ai12s/ai12-0347-1.txt	2020/02/01 01:39:48	1.4
@@ -1,4 +1,5 @@
-!standard 12.6(15)                                    20-01-29  AI12-0347-1/02
+!standard 9.6.1(35.1/5)                                  20-01-31  AI12-0347-1/03
+!standard 12.6(15)
 !standard E.4.2(5)
 !class presentation 19-10-28
 !status Amendment 1-2012 20-01-29
@@ -17,6 +18,8 @@
 
 (2) Add a specification for Rewind.
 
+(3) Add "Time_Zones." in front of Local_Time_Offset.
+
 !question
 
 (1) There seems to be a typo in 12.6(15): "...directly visible at the place 
@@ -25,6 +28,11 @@
 (2) The example in E.4.2 is illegal; the occurrence of the Copy body freezes 
 type New_Tape and thus the later overriding declaration of Rewind is illegal.
 
+(3) There is no use clause for Time_Zones in Ada.Calendar.Formatting, so all
+of the references to things defined in it need the prefix "Time_Zones.". For
+instance, all of the parameters of type Time_Offset have this prefix. But
+the default parameter Local_Time_Offset is missing it.
+
 !response
 
 (1) This is not a typo; "_instantiation" is in the syntax font. This appears
@@ -35,6 +43,8 @@
 (2) This is correct, a separate specification is required for Rewind. We add
 overriding indicators as well to clarify what is going on.
 
+(3) Yes, the call should be written Time_Zones.Local_Time_Offset.
+
 !wording
 
 (1) Modify 12.6(15):
@@ -76,6 +86,23 @@
 all of the overriding specifications. But a real program probably wouldn't have
 a type extension in a body, either.]
 
+(3) Modify 9.6.1(35.1/5):
+
+   function Local_Image (Date : Time;
+                         Include_Time_Fraction : Boolean := False) return String is
+      (Image (Date, Include_Time_Fraction, {Time_Zones.}Local_Time_Offset (Date)));
+
+!corrigendum 9.6.1(35/2)
+
+@dinsa
+@xcode<   @b<function> Image (Date : Time;
+                   Include_Time_Fraction : Boolean := False;
+                   Time_Zone  : Time_Zones.Time_Offset := 0) @b<return> String;>
+@dinst
+@xcode<   @b<function> Local_Image (Date : Time;
+                         Include_Time_Fraction : Boolean := False) @b<return> String @b<is>
+      (Image (Date, Include_Time_Fraction, Time_Zones.Local_Time_Offset (Date)));>
+
 !corrigendum 12.6(15)
 
 @drepl
@@ -272,5 +299,43 @@
 
 Thus I agree only Rewind specification is necessary but I thought that adding
 both was more compliant with Ada style ;-)
+
+****************************************************************
+
+From: Arnaud Charlet
+Sent: Friday, January 31, 2020  8:16 AM
+
+In implementing AI12-0336 Meaning of Time_Offset in GNAT, I found that we need 
+the following small change:
+
+Replace
+
+   function Local_Image (Date : Time;
+                         Include_Time_Fraction : Boolean := False) return String is
+      (Image (Date, Include_Time_Fraction, Local_Time_Offset (Date)));
+
+with:
+
+   function Local_Image (Date : Time;
+                         Include_Time_Fraction : Boolean := False) return String is
+      (Image (Date, Include_Time_Fraction, Time_Zones.Local_Time_Offset (Date)));
+
+In other words, we have no 'use' clause on Time_Zones and Local_Time_Offset 
+cannot be resolved.
+
+****************************************************************
+
+From: Randy Brukardt
+Sent: Friday, January 31, 2020  7:29 PM
+
+Makes sense, since all of the parameter types in the package use 
+"Time_Zones.Time_Offset".
+
+I'll put this into the "presentation" AI (the current one is AI12-0347-1), 
+since it doesn't involve any semantic change. [The "presentation" AI gathers 
+a bunch of changes that don't change semantics and should be non-controversial 
+into a single AI -- that cuts admin overhead and hopefully meeting time. I 
+also apply the changes in it immediately to the draft RM without waiting for 
+ARG approval, so we don't have to wait to get rid of silly mistakes.]
 
 ****************************************************************

Questions? Ask the ACAA Technical Agent