Closed Bug 280971 Opened 20 years ago Closed 20 years ago

calIDateTime properties like hour should all be in the given timezone

Categories

(Calendar :: Internal Components, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mvl, Assigned: mvl)

Details

Attachments

(2 files)

calIDateTime.hour should give (and set) the hour in the timezone the object is in.
Also, converting from utc should really work. libical is broken, and doesn't set
is_utc.
Attached patch v1 — — Splinter Review
Attachment #173308 - Flags: first-review?(vladimir)
Hmm, I'm wondering what the potential breakage of doing this is.  The comments
in calIDateTime.idl need to be updated as well, because by doing this we're
elevating the .timezone field to more than just the preferred serialization
timezone.  Do datetime comparisons, etc. still work?  Same with assignment
to/from jsDates?

I guess a test suite would help answer these questions =/
if .timezone only means what the prefered serialization is, you can't do
timezone calculations at all. And they are needed. (if only to convert from the
stored timezone to the timezone used to display)
I have to test comparision. I do have some tests for timezone calculation and
for jsDate. I will clean them up and publish them.
Attached file testcase —
This testcase tests timezone conversion and compare in different timezones.
With the patch, the testcase succeeds. without the patch, it fails.
(but ofcourse the testcase is based on the new meaning of the properties)
Comment on attachment 173308 [details] [diff] [review]
v1

r=vladimir, good enough for me.  let's land it and fix whatever breaks.
Attachment #173308 - Flags: first-review?(vladimir) → first-review+
patch checked in
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: