From: <and...@us...> - 2008-08-26 09:02:33
|
Revision: 8713 http://plplot.svn.sourceforge.net/plplot/?rev=8713&view=rev Author: andrewross Date: 2008-08-26 09:02:42 +0000 (Tue, 26 Aug 2008) Log Message: ----------- Ada version of example 29 does not work reliably for all timezones for the same reason that the old C version did not. Some regions (e.g. UK) were in daylight saving on January 1 1970 and so the offset is wrong. For now just hard-code in the correct value until Jerry can work out how to get UTC time in Ada. Modified Paths: -------------- trunk/examples/ada/x29a.adb.cmake trunk/examples/ada/xthick29a.adb.cmake Modified: trunk/examples/ada/x29a.adb.cmake =================================================================== --- trunk/examples/ada/x29a.adb.cmake 2008-08-26 02:37:51 UTC (rev 8712) +++ trunk/examples/ada/x29a.adb.cmake 2008-08-26 09:02:42 UTC (rev 8713) @@ -134,7 +134,11 @@ begin -- Find the number of seconds since January 1, 1970 to December 1, 2005. -- Should be 1_133_395_200.0. - xmin := Long_Float(Time_Of(2005, 12, 1, 0.0) - Time_Of(1970, 1, 1, 0.0)); + -- This method does not work reliably for timezones which were + -- on daylight saving time on Janary 1 1970, e.g. the UK. + -- xmin := Long_Float(Time_Of(2005, 12, 1, 0.0) - Time_Of(1970, 1, 1, 0.0)); + -- For now we will just hard code it + xmin := 1133395200.0; xmax := xmin + Long_Float(x'length) * 60.0 * 60.0 * 24.0; ymin := 0.0; Modified: trunk/examples/ada/xthick29a.adb.cmake =================================================================== --- trunk/examples/ada/xthick29a.adb.cmake 2008-08-26 02:37:51 UTC (rev 8712) +++ trunk/examples/ada/xthick29a.adb.cmake 2008-08-26 09:02:42 UTC (rev 8713) @@ -121,7 +121,12 @@ begin -- Find the number of seconds since January 1, 1970 to December 1, 2005. -- Should be 1_133_395_200.0. - xmin := Long_Float(Time_Of(2005, 12, 1, 0.0) - Time_Of(1970, 1, 1, 0.0)); + -- This method does not work reliably for timezones which were + -- on daylight saving time on Janary 1 1970, e.g. the UK. + -- xmin := Long_Float(Time_Of(2005, 12, 1, 0.0) - Time_Of(1970, 1, 1, 0.0)); + -- For now we will just hard code it + xmin := 1133395200.0; + xmax := xmin + Long_Float(x'length) * 60.0 * 60.0 * 24.0; ymin := 0.0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |