MozillaZine

Time change on shared calendar

For discussing the Mozilla Calendar, Sunbird and Lightning projects.
rjbutler001
 
Posts: 7
Joined: May 12th, 2005, 11:13 pm

Post Posted May 12th, 2005, 11:17 pm

Dear all,

Sorry if this has already been answered, as it seems to be in Bugzilla as 222249, but searching the newsgroup I have not been able to find anything.

I have been trying to "Publish" a Calendar, either from a free-standing Sunbird installation or a T'bird-extension (on Linux) to a Webdav Server. If my wife opens this from her Win XP machine (or if I reimport it under a different name to mine, the times vary - usually forward- by an hour.

Setting to UTC may make it more stable, but times display in UTC also, and I am afraid my personal internal clock doesn't work that way.

There is a reference in the Bug Report to a VTIMEZONE entry. Can anyone advise me please about this?

Thanks for any help.

Russell

Rod Whiteley

User avatar
 
Posts: 11480
Joined: December 6th, 2004, 3:41 am
Location: UK

Post Posted May 13th, 2005, 12:33 am

If you leave the "Store dates [sic] in Universal Time" box unchecked, then times are stored exactly as you see them. If someone else sees different times, that is surprising.

If you check the box, then times are stored internally in UTC. When your calendar displays entries, it converts the internal stored times to your local time zone for display. If you see UTC times displayed, that is also surprising.

The current versions do not support VTIMEZONE.

An operating system bug in Windows causes the TZ environment variable to interfere with many time zone features. On my Windows system, I ensure that TZ is not set. A few programs require TZ. I use batch files to set it locally for those programs.

So your problem requires further investigation. It might help if you can give an actual example—the time that you see in Linux, the time that your wife sees in Windows, and the actual data stored in the .ics file (which you can see by openng it in a text editor).
Rod

rjbutler001
 
Posts: 7
Joined: May 12th, 2005, 11:13 pm

Post Posted May 15th, 2005, 3:14 am

Thanks, Rod

Sorry I have been occupied elsewhere.

I set up a test calendar, hoping to start from scratch.
On Linux event is 11 May 10:00-11:00

Windows 11 May 11:00-12:00
Calendar Data follows:
BEGIN:VCALENDAR
VERSION
:2.0
PRODID
:-//Mozilla.org/NONSGML Mozilla Calendar V1.0//EN
BEGIN:VEVENT
UID
:986311c4-1dd1-11b2-92a4-c40df3dfe1bd
SUMMARY
:test_1
CATEGORIES
:Miscellaneous
STATUS
:TENTATIVE
CLASS
:PUBLIC
X-MOZILLA-ALARM-DEFAULT-LENGTH
:0
DTSTART
:20050511T100000
DTEND
:20050511T110000
DTSTAMP
:20050511T123040Z
LAST-MODIFIED
:20050511T123331Z
END:VEVENT
END:VCALENDAR

___________
Thanks

Russell

Rod Whiteley

User avatar
 
Posts: 11480
Joined: December 6th, 2004, 3:41 am
Location: UK

Post Posted May 15th, 2005, 3:46 am

When I open that in Calendar in Firefox on Windows, I see the event from 10:00 to 11:00. This suggests that there is something strange about your wife's machine.

The format 20050511T100000 effectively means "display this date and time without any conversion", but there are internal conversions and they seem to be going wrong. You could check all the time-related settings in the hope of finding something.
Rod

rjbutler001
 
Posts: 7
Joined: May 12th, 2005, 11:13 pm

Post Posted May 15th, 2005, 3:51 am

Having the bit between my teeth, I opened the .ics file from Windows and from my Webdav server, I will just paste the event data:

Linux/Webdav

DTSTART
:20050511T000000Z
DTEND
:20050511T010000Z
DTSTAMP
:20050511T123040Z
LAST-MODIFIED
:20050511T123331Z
END:VEVENT

Windows:

DTSTART
:20050511T000000Z
DTEND
:20050511T010000Z
DTSTAMP
:20050511T123040Z
LAST-MODIFIED
:20050515T095021Z
END:VEVENT
_________
To me it appears to be changing at the original Publish.
Neither calendar is set to UTC at present

Russell

rjbutler001
 
Posts: 7
Joined: May 12th, 2005, 11:13 pm

Post Posted May 15th, 2005, 6:00 am

I worked through this with my son, and if I edit out the last -Z in the
DTSTART
:20050511T000000Z , thecalendar will show 00:00 (which is right for UTC +10 = Australian Eastern time -no daylight saving.

Seems it is a problem with interpreting the UTC time in the calendar?

Rod Whiteley

User avatar
 
Posts: 11480
Joined: December 6th, 2004, 3:41 am
Location: UK

Post Posted May 15th, 2005, 8:17 am

Publishing the calendar changes all the events to UTC? My test calendar on iCalX has some floating events and some UTC events. The file there is just the same as the local file. So again I am surprised at what you have found. Perhaps it only happens if you publish from Linux.

If the Windows machine does not convert UTC to local time correctly, then it is most likely a problem in the Windows settings, or it could be the TZ bug. For a quick check, choose Tools – JavaScript Console in a Mozilla product, and evaluate:
Code: Select all
(new Date()).toUTCString()
Compare with a UTC time standard like: The official U.S. time
Rod

rjbutler001
 
Posts: 7
Joined: May 12th, 2005, 11:13 pm

Post Posted May 15th, 2005, 6:06 pm

Thanks, Rod

(new Date()).toUTCString() evluates correctly on both Linux and Windows machines

If I did not make it clear, importing the file back from the server onto Linux (either Firefox Calendar Extension or stand-alone Sunbird) gives the one hour error also.

I tried the rverse - publishing an event 11:00 on 17/05/2005, and the same thing occurs (publishing from Windows to my Webdav server - reading in FF Calendar - Linux) shows as 12:00, and file shows:

SUMMARY
:Test-ex Windows
STATUS
:TENTATIVE
CLASS
:PUBLIC
X-MOZILLA-RECUR-DEFAULT-INTERVAL
:0
DTSTART
:20050517T010000Z
DTEND
:20050517T020000Z
DTSTAMP
:20050516T005533Z
END:VEVENT
_______
I am afraid I know 0 about Javascript, but am willing to learn some if it will help.

Russell

Rod Whiteley

User avatar
 
Posts: 11480
Joined: December 6th, 2004, 3:41 am
Location: UK

Post Posted May 16th, 2005, 4:02 am

I cannot reproduce that behaviour. I set my time zone for Canberra/Melbourne/Sydney, made sure that Calendar is not set to use UTC, and created an event at 11:00 on 17/05/2005. Then I published it on my own WebDAV server and also on iCalX, and subscribed to the remote files. All three calendars display the event at 11:00, and all five calendar files (three local, two remote) contain DTSTART :20050517T110000.

I also tried it with the UTC setting. I found a couple of problems. Calendar stores the wrong UTC time, 20050517T000000Z. Maybe it thinks it is summer in Australia and daylight saving is in effect. But it makes the same mistake when it converts the time for display, so the errors cancel out and I still see 11:00.

The web view on iCalX does not convert UTC, so the event appears to start at midnight there. That is purely an iCalX issue.

So you have two problems that I do not have. One is that you get UTC in the file even when the box in Preferences is not checked. The other is that the displayed time is an hour out. Perhaps you could try again using iCalX just to rule out a problem on the server, and then report the bugs in Bugzilla. Unfortunately it is a bad time to get anything fixed, because so much code has been rewritten recently.
Rod

rjbutler001
 
Posts: 7
Joined: May 12th, 2005, 11:13 pm

Post Posted May 16th, 2005, 4:19 am

Thanks Rod,

Could you try one thing for me, because I think this is the nub of it,
Edit your time to DTSTART :20050517T110000Z and see what is displayed? Or are you saying you have already checked that? My problem is the error in displaying the UTC setting -generates the offset between the two machines

______
Russell

Rod Whiteley

User avatar
 
Posts: 11480
Joined: December 6th, 2004, 3:41 am
Location: UK

Post Posted May 16th, 2005, 5:10 am

With my zone set for Canberra/Melbourne/Sydney, Calendar displays DTSTART :20050517T110000Z as 22:00. I did check that before. I wrote: "...makes the same mistake when it converts the time for display...". It thinks my zone is GMT+11, when it is really GMT+10.
Rod

rjbutler001
 
Posts: 7
Joined: May 12th, 2005, 11:13 pm

Post Posted May 16th, 2005, 6:47 am

Sorry Rod, didn't register.
That is the critical error. If this were evaluated correctly I would have no problems. I'll post a bug report.

Thanks foryour help and patience
_______
Russell

Return to Calendar


Who is online

Users browsing this forum: No registered users and 1 guest