Uploaded image for project: 'Axis2-C'
  1. Axis2-C
  2. AXIS2C-1500

date_time serialize may use invalid separator for milliseconds

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.7.0
    • util
    • None
    • OS: Windows 7, Windows Server 2003,
      Compiler: Visual Studio 2010 (VC10)
      32-bit build

    Description

      Axis2/C date/time serialization routines in util/src/date_time.c use sprintf. This may lead to comma used as separator between seconds and milliseconds, due to locale settings. I'm not sure if sprintf is locale-dependent on Windows only, or this behavior also exists on other platforms.

      The standard mandates use of dot (".") as separator, comma is not allowed: http://www.w3.org/TR/xmlschema-2/#dateTime

      Affected routines:

      • axutil_date_time_serialize_time
      • axutil_date_time_serialize_time_with_time_zone
      • axutil_date_time_serialize_date_time
      • axutil_date_time_serialize_date_time_with_time_zone

      I believe, serialize should provide valid (as per standard) output, no matter which separator is specified in locale.

      Attachments

        Activity

          People

            samisa Don Samisa Abeysinghe
            ipechorin Ivan Pechorin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: