Closed Bug 412997 Opened 18 years ago Closed 18 years ago

Microseconds not normalized when they need to be

Categories

(Core Graveyard :: XForms, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: aaronr, Assigned: msterlin)

References

()

Details

(Keywords: fixed1.8.1.17)

Attachments

(3 files)

based off of a comment in bug 412028. ValidateBuiltinTypeDateTime, ValidateBuiltinTypeDate, and ValidateBuiltinTypeTime also need to take into account time zones. They are setting the second parameter to PR_ParseTimeString to PR_TRUE, meaning that the info that is being passed in is in UTC, when in fact it isn't. Perhaps PR_NormalizeTime should be called first, before PR_ParseTimeString?
testcase in the URL field. This bug is why the last value is returned as 2 instead of 3.
Attached patch patchSplinter Review
ValidateBuiltinTypeDate/DateTime/Time must check if the time represents a GMT time so they can pass the correct value (true or false) for the 'default_to_gmt' parameter of PR_ParseTimeString.
Attachment #310333 - Flags: review?(doronr)
Assignee: doronr → msterlin
Status: NEW → ASSIGNED
Comment on attachment 310333 [details] [diff] [review] patch >+ /** >+ * Determine if an xsd:date, xsd:dateTime, or xsd:time string >+ * represents a GMT (aka UTC) time. >+ */ >+ PRBool IsGMT(const nsAString & aDateTime); >+ > static void > ReleaseObject(void *aObject, > nsIAtom *aPropertyName, > void *aPropertyValue, > void *aData) > { > static_cast<nsISupports *>(aPropertyValue)->Release(); > } I think IsGMT belongs in nsSchemaValidatorUtils so we can reuse it later in the Utils methods if we need to. Other than that, looks good.
Attachment #310333 - Flags: review?(doronr) → review+
Blocks: 423730
Attached patch patch2Splinter Review
Moving isGMT function to nsSchemaValidatorUtils.
Attachment #310333 - Attachment is obsolete: true
Attachment #310348 - Flags: review?(aaronr)
Comment on attachment 310333 [details] [diff] [review] patch nit: add a comment to IsGMT so that we know that it assumes that aDateTime has been validated prior to being passed in. with that, r=me
Attachment #310333 - Attachment is obsolete: false
Attachment #310333 - Flags: review+
Attachment #310348 - Flags: review?(aaronr)
checked into trunk for msterlin
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: xf-to-branch
Attached patch patch for 1.8Splinter Review
patch for 1.8 branch
checked into 1.8 branch for msterlin
Keywords: fixed1.8.1.17
Whiteboard: xf-to-branch
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: