bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

Microseconds not normalized when they need to be

RESOLVED FIXED

Status

Core Graveyard
XForms
RESOLVED FIXED
11 years ago
2 years ago

People

(Reporter: aaronr, Assigned: Merle Sterling)

Tracking

({fixed1.8.1.17})

Trunk
x86
All
fixed1.8.1.17

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(3 attachments)

(Reporter)

Description

11 years ago
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?
(Reporter)

Comment 1

11 years ago
testcase in the URL field.  This bug is why the last value is returned as 2 instead of 3.
(Assignee)

Comment 2

11 years ago
Created attachment 310333 [details] [diff] [review]
patch

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)
(Reporter)

Updated

11 years ago
Assignee: doronr → msterlin
(Assignee)

Updated

11 years ago
Status: NEW → ASSIGNED

Comment 3

11 years ago
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+
(Assignee)

Updated

11 years ago
Blocks: 423730
(Assignee)

Comment 4

11 years ago
Created attachment 310348 [details] [diff] [review]
patch2

Moving isGMT function to nsSchemaValidatorUtils.
Attachment #310333 - Attachment is obsolete: true
Attachment #310348 - Flags: review?(aaronr)
(Reporter)

Comment 5

11 years ago
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+
(Reporter)

Updated

11 years ago
Attachment #310348 - Flags: review?(aaronr)
(Reporter)

Comment 6

10 years ago
checked into trunk for msterlin
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
Whiteboard: xf-to-branch
(Reporter)

Comment 7

10 years ago
Created attachment 331445 [details] [diff] [review]
patch for 1.8

patch for 1.8 branch
(Reporter)

Comment 8

10 years ago
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.