From: Sebastien Godard Date: Tue, 8 May 2012 12:25:52 +0000 (+0200) Subject: Change time format from HH-MM-SS to HH:MM:SS in the reports X-Git-Tag: v10.0.5~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=521c8f731f4b4fe7e9375e83d6c4f8d2383a96a8;p=sysstat Change time format from HH-MM-SS to HH:MM:SS in the reports displyaed by sadf. Change the time format to HH:MM:SS to be consistent with XSD document. This was already the format used a few versions ago and was changed for an unknown reason. Mail from Frank Glinka 24/04/2012: Your sysstat.xsd specifies the type xs:time for the time elements within the XML. According to the schema specification the format then must be HH:MM:SS for the data but sadf's format is HH-MM-SS. Correspondingly, the element is not valid and not parsed by JAXB. See: http://www.w3.org/TR/xmlschema-2/#time http://www.w3schools.com/schema/schema_dtypes_date.asp --- diff --git a/CHANGES b/CHANGES index 2e1ff3f..4ec78b4 100644 --- a/CHANGES +++ b/CHANGES @@ -4,6 +4,8 @@ xxxx/xx/xx: Version 10.0.5 - Sebastien Godard (sysstat orange.fr) * [Alain Chereau]: Options -g and -T added to iostat. These options enable the user to display statistics for groups of devices. + * sadf: Change time format from HH-MM-SS to HH:MM:SS in the + various reports displayed by sadf. * XSD document updated: Added a maxOccurs indicator for the timestamp element. * [Peter Schiffer]: Set exit code to 0 for sa2 shell script. diff --git a/sadf.c b/sadf.c index 1bc607c..d6a2b76 100644 --- a/sadf.c +++ b/sadf.c @@ -250,7 +250,7 @@ void set_record_timestamp_string(int curr, char *cur_date, char *cur_time, int l * cur_time is expressed in local time. Else it is expressed in UTC. */ strftime(cur_date, len, "%Y-%m-%d", rectime); - strftime(cur_time, len, "%H-%M-%S", rectime); + strftime(cur_time, len, "%H:%M:%S", rectime); } }