Begin Tab Sub Links
<< Back to Software

How to Fix Issues due to Daylight Savings Switchover Date Change in US and Canadian Timezones, in Sun Calendar Server 6.x.

last updated on: 2007-03-14

Starting from 2007, the daylight savings start and end dates in the US and Canadian timezones that observe DST is changing. The start of Daylight savings will be on the second Sunday in March instead of 1st Sunday in April and the end will be the first Sunday of November instead of last Sunday in October. The timezones.ics file was fixed for these changes and released as part of a patch earlier. But this takes care of newly created events and tasks only. Events and tasks when created are converted to GMT using the rules in the timezones.ics file and stored in the calendar database. Hence the timings of events and tasks created before the patched timezones.ics was applied were converted using the old rules and they will be off when converted back for display, using the new rules.

One way to address this issue is to edit the events and correct the timings individually. Alternatively, Sun provides a tool that can be run by the Administrator to address these incorrect event timings systemically. Sun recommends that all users double check their meeting timings during the period between the new switchover date and the old one to ensure all tasks and events have been updated in the affected date ranges.

For reference, here are the affected dates for 4 years:

March 11 - April 1
October 28 - November 4
March 9 - April 6
October 26 - November 2
March 8 - April 5
October 25 - November 1
March 14 - April 4
October 31 - November 7

Sun is aware of two versions of the timezones.ics file that could cause the problem events and tasks. One version is what existed before patch 35 and the other version is what existed between patch 35 and 39. Events created with either of these files show up wrongly with the fixed file available with patch 40. The goal is to fix the events in the database after patch 40 or later is applied.

The tool reads the events and tasks from the existing database, corrects them as required and writes to a new database. So once the tool finishes running, if you point your server instance to the new database and start the services, you should see that all events and tasks have been fixed.

Download the Calendar DST Fix Tool for your platform

New in Version2.0
The earlier version of the tool, Version 1.0 did not fix alarms in the affected periods. This version of the tool takes care of that too. In addition it has a -a option that can be used to run the tool for fixing alarms only. This option should be used if the first version of the tool was run successfully and all data except alarms have already been fixed. To find the version of the tool you have, run the command with just the -V option.

How to run the tool, csdstfix

Before running the tool, the Administrator needs to get the following information.

  1. If revision 35, 36, 37, 38 or 39 of the patch 116577 was applied, when was the first patch in that list applied? On Sparc, this date can be obtained by the date on the corresponding directory in /var/sadm/patch. The time you applied the patch converted to a GMT timestring would be what you would give as value for the -p option, when you run the tool. A GMT timestring would look something like this - 20061116T060000Z

  2. If 116577-40 was applied, when was it applied? The time you applied patch 40 converted to GMT timestring is what you would give as value for the -f option. If you did not apply rev 40 but applied a rev after it, use the time that patch was applied.

Steps to follow for running the tool.

  1. Copy the tool to the sbin directory of the Calendar Server installation. By default /opt/SUNWics5/cal/sbin

  2. Make sure the tool is owned by the Calendar Server User. That is, if using default values change ownership of the tool to icsuser:icsgroup.
    #chown icsuser:icsgroup csdstfix

  3. Calculate the timestamps to be used for the -p and -f options.

  4. By default, the tool creates a backup under the source db directory. Make sure this directory or any other directory assigned as backup directory using the -b option is writable by icsuser. If you have a very large db (over 1 Gig individual dbs) or prefer to do your own backup, use the -n option.

  5. Make sure the target directory specified can be created. That is, its parent directory is writable by icsuser.

  6. Request all Outlook users to sync their calendars.

  7. Stop services.

  8. Run the tool with the appropriate options, as Super User.

  9. Edit ics.conf and point homedir (caldb.berkeleydb.homedir.path) to the new db. (*)

  10. Restart services.

(*)Instead of using the existing csdb directory as source and another location for the new db, the Administrator can move the existing csdb to another location, say old_csdb after stopping the services. And then run the tool, such that it writes the new db in the default csdb location. No editing of ics.conf before restart will be required in this case.

Other important notes

  1. Apply the DST fix related OS and Java patches.

  2. This tool runs on CS6.0, CS6.1 and CS6.2 versions only. If you have an earlier version like CS5.1.1, you will first need to upgrade to CS6.x using the cs5migrate tool, before running this.

  3. If you upgraded from 5.1.1 to 6.x earlier but never ran the recurring migration (cs5migrate -r), it would be better to do that before running this tool.

Tool help

For help, run the tool with no options specified:

% csdstfix

csdstfix [-q] [-d] [-b backup_dir] [-n] [-p partial_fix_timestamp] [-f full_fix_timestamp] source_dir target_dir
csdstfix -a -f fullfix_timestamp source_db target_db
csdstfix -V

Fix timings for events/todos due to DST switchover date change.

csdstfix [-q] [-d] [-b backup_dir] [-n] [-p partial_fix_timestamp] [-f full_fix_timestamp] source_dir target_dir

Where the following options may be specified:

-q Specify quiet mode, no print statements
-d Specify dry run mode, no real action
-b backup_dir Specify directory to backup source db

Default location is the directory "backup" under the source db directory

If individual dbs are over 1Gig, please make your own backups and run with -n option

-n Do not do backups, work on source db

If individual dbs are over 1Gig, be sure to do all backups before running the tool.

-p timestamp Specify the time patch 35, 36, 37, 38, 39 (whichever is earlier) was applied.

This is the timestamp of when the patch with the partial fixed timezones.ics file was applied.

-f timestamp Specify the time patch 40 or later (whichever is earlier) was applied.

This is the timestamp of when the patch with the fixed timezones.ics file was applied.

Note: The directory /var/sadm/patch contains the list of installed patches. The date of creation of a directory for a particular patch is actually the date of patch installation.

Both of the following values MUST be specified:

source_dir Directory where pre migration db files are located
target_dir Directory where post migration files will be created


If last patch applied was patch 34 or before.

% csdstfix /var/opt/SUNWics5/old_db /var/opt/SUNWics5/new_db

If last patch applied was a patch between 35 and 39 and the first patch from that list was applied at 20061116T194723Z.

% csdstfix -p 20061116T194723Z /var/opt/SUNWics5/old_db /var/opt/SUNWics5/new_db

If last patch applied was patch 40 and patches 35 to 39 were never applied.

% csdstfix -f 20070214T213534Z /var/opt/SUNWics5/old_db /var/opt/SUNWics5/new_db

If last patch applied was patch 40 and one or more of patches 35 to 39 were applied. The first of the patches 35 - 39 was applied at 20061116T194723Z and patch 40 was applied at 20070214T213534Z.

% csdstfix -p 20061116T194723Z -f 20070214T213534Z /var/opt/SUNWics5/old_db /var/opt/SUNWics5/new_db

If the previous version of this tool was run and the reminders are not displaying correctly, run the tool with the -a option, to fix the alarms only

% csdstfix -a -f fullfix_timestamp source_db target_db

To print the version of the tool, use the -V option

% csdstfix -V

Change Log

Note: This Change Log only reflects changes made to this web page. Please refer to product specific information for details of product updates.
  • [2007-03-14] Added updates for DST Fix Tool Version 2, released 3/14.
  • [2007-03-12] Added comment on next tool version availability on 3/14 to address alarm/update reminders.