changes to "set_globattr"

Added a "datetime" import. Some changes were made to the if
statement that sets the temporal grouping mode. Change the
grabbing of the history attribute to use "getattr" so it could
be more easily overloaded in the OCGIS calculations.