summaryrefslogtreecommitdiffstats
path: root/comm/calendar/base/public/calITimezoneService.idl
blob: 6c7ef241121d2328fa8b245c3358b50cf2d0f3c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsISupports.idl"

interface calITimezone;

/**
 * Provides access to timezone definitions from the IANA Time Zone Database.
 */
[scriptable, uuid(ab1bfe6a-ee95-4038-b594-34aeeda9911a)]
interface calITimezoneService : nsISupports
{
    /**
     * All canonical timezone IDs provided by the current IANA Time Zone
     * Database; intended to provide a list of selectable timezones, not to
     * restrict the list of valid timezones.
     */
    readonly attribute Array<AUTF8String> timezoneIds;

    /**
     * The version of the IANA Time Zone Database provided.
     */
    readonly attribute AUTF8String version;

    /**
     * Get a timezone definition by timezone ID.
     *
     * @param tzid       timezone ID for which to return definition
     * @return           a timezone object, or null if ID is not recognized
     */
    calITimezone getTimezone(in AUTF8String tzid);

    /**
     * The definition for the "floating" timezone, in which times are relative
     * to local time.
     */
    readonly attribute calITimezone floating;

    /**
     * The timezone definition for Coordinated Universal Time.
     */
    readonly attribute calITimezone UTC;

    /**
     * Returns the current default timezone for calendars/events.
     */
    readonly attribute calITimezone defaultTimezone;
};