xref: /haiku/docs/user/locale/TimeZone.dox (revision 220d04022750f40f8bac8f01fa551211e28d04f2)
1/*
2 * Copyright 2011 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 *
5 * Authors:
6 *		Adrien Destugues, pulkomandy@pulkomandy.ath.cx
7 *		John Scipione, jscipione@gmail.com
8 *		Oliver Tappe, zooey@hirschkaefer.de
9 *
10 * Corresponds to:
11 *		headers/os/locale/TimeZone.h	 rev 42274
12 *		src/kits/locale/TimeZone.cpp	 rev 42274
13 */
14
15
16/*!
17	\file TimeZone.h
18	\ingroup locale
19	\ingroup libbe
20	\brief Provides the BTimeZone class.
21*/
22
23
24/*!
25	\class BTimeZone
26	\ingroup locale
27	\ingroup libbe
28	\brief Provides information about time zones.
29
30	\since Haiku R1
31*/
32
33
34/*!
35	\fn BTimeZone::BTimeZone(const char* zoneID, const BLanguage* language)
36	\brief Construct a timezone from its \a zoneID and \a language.
37
38	The constructor only allows you to construct a timezone if you already
39	know its code. If you don't know the code, you can instead go through the
40	BCountry class which can enumerate all timezones in a country, or use the
41	BLocaleRoster, which knows the timezone selected by the user.
42
43	\since Haiku R1
44*/
45
46
47/*!
48	\fn BTimeZone::BTimeZone(const BTimeZone& other)
49
50	\since Haiku R1
51*/
52
53
54/*!
55	\fn BTimeZone& BTimeZone::operator=(const BTimeZone& source)
56
57	\since Haiku R1
58*/
59
60
61/*!
62	\fn const BString& BTimeZone::ID() const
63	\brief Returns the ID of the time zone.
64
65	\since Haiku R1
66*/
67
68
69/*!
70	\fn const BString& BTimeZone::Name() const
71	\brief Returns the localized name of the time zone.
72
73	Use this method to display the time zone's name to the user.
74
75	\since Haiku R1
76*/
77
78
79/*!
80	\fn const BString& BTimeZone::DaylightSavingName() const
81	\brief Returns the name of the daylight savings rules used in this timezone.
82
83	\since Haiku R1
84*/
85
86
87/*!
88	\fn const BString& BTimeZone::ShortName() const
89	\brief Returns the short name of the timezone, in the user's locale.
90
91	\since Haiku R1
92*/
93
94
95/*!
96	\fn const BString& BTimeZone::ShortDaylightSavingName() const
97	\brief Returns the short name of the daylight savings rules used in this
98	       timezone.
99
100	\since Haiku R1
101*/
102
103
104/*!
105	\fn int BTimeZone::OffsetFromGMT() const
106	\brief Return the offset from GMT.
107
108	The offset is a number of seconds, positive or negative.
109
110	\since Haiku R1
111*/
112
113
114/*!
115	\fn bool BTimeZone::SupportsDaylightSaving() const
116	\brief Return true if the time zone has daylight saving rules
117
118	\since Haiku R1
119*/
120
121
122/*!
123	\fn status_t BTimeZone::InitCheck() const
124	\brief Return \c false if there was an error creating the timezone
125	       for instance if you called the constructor or SetTo() with an
126	       invalid timezone code.
127
128	\since Haiku R1
129*/
130
131
132/*!
133	\fn status_t BTimeZone::SetTo(const char* zoneCode,
134		const BLanguage* language = NULL)
135	\brief Set the timezone to another code.
136
137	\returns \c false if there was an error (likely due to an invalid
138	         timezone code.)
139
140	\since Haiku R1
141*/
142