rails_client_timezone 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d22bda7d6d4adcb829c4fb4c8c51c1fa9865b502
4
- data.tar.gz: d4b910baf286d428bd80b7d156d7844b2447547e
3
+ metadata.gz: a14bf410abef7c8faac8d4e3dceef0a8ff533357
4
+ data.tar.gz: e2356a16660db0b374599be2b5545a3c086c941f
5
5
  SHA512:
6
- metadata.gz: 684681aa4a8f0fe1ed5ffcaa47f7e95465aaa87e7fd5bbd06a19e518e424c06d3af239e2ae6f02387b8c1e7f7a845cfca9e49adeec2da0238bce8eb802adf290
7
- data.tar.gz: 2940eca67bc9ce7ad1671a51ff2b84feb1569e9b45bd92b7fefa5b30e244b3ddb24102d715c6bf2f3a5bc23ac0f114c1cda0e34db8c96908dcbf7a03515ebd58
6
+ metadata.gz: e1233209823f34f3bc9ce3b5e1f96a875bbeeabf79f2f08698c2ba5342e18b49cd50cabe60289f39a4fd2c0276aad56b3365326b03be782469a727a718e3b713
7
+ data.tar.gz: b2446ae4459b85b72b078ca7968cfcb1e204225ab252a9a5d729ee2f3a5fdfc72f9de424d87c440aa30dc9b9f7cdc46a0f3bfad05a1b0081947a7f90a56a4544
data/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Udaya Kiran
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,30 @@
1
+ // This is example code to set browser cookies. Assuming that your app uses jQuery and jquery-cookie libraries.
2
+ // These methods need to be there ideally on each page.
3
+
4
+ var browser_tz_baseline_year = 2011; //change this to 'current' if needed
5
+
6
+ var tz_baseline_year = function () {
7
+ return (browser_tz_baseline_year.toString() === "current") ? new Date().getFullYear() : browser_tz_baseline_year.toString();
8
+ }
9
+
10
+ var set_browser_offsets = function () {
11
+ var base_year = tz_baseline_year();
12
+ var winterOffset = -1 * (new Date(base_year, 11, 21)).getTimezoneOffset() * 60;
13
+ var summerOffset = -1 * (new Date(base_year, 5, 21)).getTimezoneOffset() * 60;
14
+ $.cookie('utc_offset_summer', null, {path: '/'});
15
+ $.cookie('utc_offset_winter', null, {path: '/'});
16
+ $.cookie('utc_offset_summer', summerOffset, {path: '/'});
17
+ $.cookie('utc_offset_winter', winterOffset, {path: '/'});
18
+ }
19
+
20
+ $(document).ready(function () {
21
+ set_browser_offsets();
22
+ });
23
+
24
+ $(document).ajaxStart(function () {
25
+ set_browser_offsets();
26
+ });
27
+
28
+ window.onbeforeunload = function() {
29
+ set_browser_offsets();
30
+ };
@@ -0,0 +1,34 @@
1
+ // This is example code to set browser cookies. Assuming that your app uses prototypejs
2
+ // These methods need to be there ideally on each page.
3
+
4
+ var browser_tz_baseline_year = 2011; //change this to 'current' if needed
5
+
6
+ var tz_baseline_year = function() {
7
+ return (browser_tz_baseline_year.toString() === "current") ? new Date().getFullYear() : browser_tz_baseline_year.toString();
8
+ }
9
+
10
+ var set_cookie = function(cname, cvalue, exdays) {
11
+ var d = new Date();
12
+ d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
13
+ var expires = "expires=" + d.toUTCString();
14
+ document.cookie = cname + "=" + cvalue + "; " + expires + "; path=/";
15
+ }
16
+
17
+ var set_browser_offsets = function() {
18
+ var base_year = tz_baseline_year();
19
+ var winterOffset = -1 * (new Date(base_year, 11, 21)).getTimezoneOffset() * 60;
20
+ var summerOffset = -1 * (new Date(base_year, 5, 21)).getTimezoneOffset() * 60;
21
+ set_cookie('utc_offset_summer', summerOffset, 360);
22
+ set_cookie('utc_offset_winter', winterOffset, 360);
23
+ }
24
+
25
+ document.observe("dom:loaded", function() {
26
+ set_browser_offsets();
27
+ });
28
+
29
+ Ajax.Responders.register({
30
+ onCreate: function () {
31
+ set_browser_offsets();
32
+ }
33
+ });
34
+
Binary file
@@ -0,0 +1,257 @@
1
+ # Ordered list of the ISO3166 2-character country codes, ordered by GeoIP ID
2
+ ---
3
+ - --
4
+ - AP
5
+ - EU
6
+ - AD
7
+ - AE
8
+ - AF
9
+ - AG
10
+ - AI
11
+ - AL
12
+ - AM
13
+ - CW
14
+ - AO
15
+ - AQ
16
+ - AR
17
+ - AS
18
+ - AT
19
+ - AU
20
+ - AW
21
+ - AZ
22
+ - BA
23
+ - BB
24
+ - BD
25
+ - BE
26
+ - BF
27
+ - BG
28
+ - BH
29
+ - BI
30
+ - BJ
31
+ - BM
32
+ - BN
33
+ - BO
34
+ - BR
35
+ - BS
36
+ - BT
37
+ - BV
38
+ - BW
39
+ - BY
40
+ - BZ
41
+ - CA
42
+ - CC
43
+ - CD
44
+ - CF
45
+ - CG
46
+ - CH
47
+ - CI
48
+ - CK
49
+ - CL
50
+ - CM
51
+ - CN
52
+ - CO
53
+ - CR
54
+ - CU
55
+ - CV
56
+ - CX
57
+ - CY
58
+ - CZ
59
+ - DE
60
+ - DJ
61
+ - DK
62
+ - DM
63
+ - DO
64
+ - DZ
65
+ - EC
66
+ - EE
67
+ - EG
68
+ - EH
69
+ - ER
70
+ - ES
71
+ - ET
72
+ - FI
73
+ - FJ
74
+ - FK
75
+ - FM
76
+ - FO
77
+ - FR
78
+ - SX
79
+ - GA
80
+ - GB
81
+ - GD
82
+ - GE
83
+ - GF
84
+ - GH
85
+ - GI
86
+ - GL
87
+ - GM
88
+ - GN
89
+ - GP
90
+ - GQ
91
+ - GR
92
+ - GS
93
+ - GT
94
+ - GU
95
+ - GW
96
+ - GY
97
+ - HK
98
+ - HM
99
+ - HN
100
+ - HR
101
+ - HT
102
+ - HU
103
+ - ID
104
+ - IE
105
+ - IL
106
+ - IN
107
+ - IO
108
+ - IQ
109
+ - IR
110
+ - IS
111
+ - IT
112
+ - JM
113
+ - JO
114
+ - JP
115
+ - KE
116
+ - KG
117
+ - KH
118
+ - KI
119
+ - KM
120
+ - KN
121
+ - KP
122
+ - KR
123
+ - KW
124
+ - KY
125
+ - KZ
126
+ - LA
127
+ - LB
128
+ - LC
129
+ - LI
130
+ - LK
131
+ - LR
132
+ - LS
133
+ - LT
134
+ - LU
135
+ - LV
136
+ - LY
137
+ - MA
138
+ - MC
139
+ - MD
140
+ - MG
141
+ - MH
142
+ - MK
143
+ - ML
144
+ - MM
145
+ - MN
146
+ - MO
147
+ - MP
148
+ - MQ
149
+ - MR
150
+ - MS
151
+ - MT
152
+ - MU
153
+ - MV
154
+ - MW
155
+ - MX
156
+ - MY
157
+ - MZ
158
+ - NA
159
+ - NC
160
+ - NE
161
+ - NF
162
+ - NG
163
+ - NI
164
+ - NL
165
+ - "NO"
166
+ - NP
167
+ - NR
168
+ - NU
169
+ - NZ
170
+ - OM
171
+ - PA
172
+ - PE
173
+ - PF
174
+ - PG
175
+ - PH
176
+ - PK
177
+ - PL
178
+ - PM
179
+ - PN
180
+ - PR
181
+ - PS
182
+ - PT
183
+ - PW
184
+ - PY
185
+ - QA
186
+ - RE
187
+ - RO
188
+ - RU
189
+ - RW
190
+ - SA
191
+ - SB
192
+ - SC
193
+ - SD
194
+ - SE
195
+ - SG
196
+ - SH
197
+ - SI
198
+ - SJ
199
+ - SK
200
+ - SL
201
+ - SM
202
+ - SN
203
+ - SO
204
+ - SR
205
+ - ST
206
+ - SV
207
+ - SY
208
+ - SZ
209
+ - TC
210
+ - TD
211
+ - TF
212
+ - TG
213
+ - TH
214
+ - TJ
215
+ - TK
216
+ - TM
217
+ - TN
218
+ - TO
219
+ - TL
220
+ - TR
221
+ - TT
222
+ - TV
223
+ - TW
224
+ - TZ
225
+ - UA
226
+ - UG
227
+ - UM
228
+ - US
229
+ - UY
230
+ - UZ
231
+ - VA
232
+ - VC
233
+ - VE
234
+ - VG
235
+ - VI
236
+ - VN
237
+ - VU
238
+ - WF
239
+ - WS
240
+ - YE
241
+ - YT
242
+ - RS
243
+ - ZA
244
+ - ZM
245
+ - ME
246
+ - ZW
247
+ - A1
248
+ - A2
249
+ - O1
250
+ - AX
251
+ - GG
252
+ - IM
253
+ - JE
254
+ - BL
255
+ - MF
256
+ - BQ
257
+ - SS
@@ -0,0 +1,257 @@
1
+ # Ordered list of the ISO3166 3-character country codes, ordered by GeoIP ID
2
+ ---
3
+ - --
4
+ - AP
5
+ - EU
6
+ - AND
7
+ - ARE
8
+ - AFG
9
+ - ATG
10
+ - AIA
11
+ - ALB
12
+ - ARM
13
+ - CUW
14
+ - AGO
15
+ - ATA
16
+ - ARG
17
+ - ASM
18
+ - AUT
19
+ - AUS
20
+ - ABW
21
+ - AZE
22
+ - BIH
23
+ - BRB
24
+ - BGD
25
+ - BEL
26
+ - BFA
27
+ - BGR
28
+ - BHR
29
+ - BDI
30
+ - BEN
31
+ - BMU
32
+ - BRN
33
+ - BOL
34
+ - BRA
35
+ - BHS
36
+ - BTN
37
+ - BVT
38
+ - BWA
39
+ - BLR
40
+ - BLZ
41
+ - CAN
42
+ - CCK
43
+ - COD
44
+ - CAF
45
+ - COG
46
+ - CHE
47
+ - CIV
48
+ - COK
49
+ - CHL
50
+ - CMR
51
+ - CHN
52
+ - COL
53
+ - CRI
54
+ - CUB
55
+ - CPV
56
+ - CXR
57
+ - CYP
58
+ - CZE
59
+ - DEU
60
+ - DJI
61
+ - DNK
62
+ - DMA
63
+ - DOM
64
+ - DZA
65
+ - ECU
66
+ - EST
67
+ - EGY
68
+ - ESH
69
+ - ERI
70
+ - ESP
71
+ - ETH
72
+ - FIN
73
+ - FJI
74
+ - FLK
75
+ - FSM
76
+ - FRO
77
+ - FRA
78
+ - SXM
79
+ - GAB
80
+ - GBR
81
+ - GRD
82
+ - GEO
83
+ - GUF
84
+ - GHA
85
+ - GIB
86
+ - GRL
87
+ - GMB
88
+ - GIN
89
+ - GLP
90
+ - GNQ
91
+ - GRC
92
+ - SGS
93
+ - GTM
94
+ - GUM
95
+ - GNB
96
+ - GUY
97
+ - HKG
98
+ - HMD
99
+ - HND
100
+ - HRV
101
+ - HTI
102
+ - HUN
103
+ - IDN
104
+ - IRL
105
+ - ISR
106
+ - IND
107
+ - IOT
108
+ - IRQ
109
+ - IRN
110
+ - ISL
111
+ - ITA
112
+ - JAM
113
+ - JOR
114
+ - JPN
115
+ - KEN
116
+ - KGZ
117
+ - KHM
118
+ - KIR
119
+ - COM
120
+ - KNA
121
+ - PRK
122
+ - KOR
123
+ - KWT
124
+ - CYM
125
+ - KAZ
126
+ - LAO
127
+ - LBN
128
+ - LCA
129
+ - LIE
130
+ - LKA
131
+ - LBR
132
+ - LSO
133
+ - LTU
134
+ - LUX
135
+ - LVA
136
+ - LBY
137
+ - MAR
138
+ - MCO
139
+ - MDA
140
+ - MDG
141
+ - MHL
142
+ - MKD
143
+ - MLI
144
+ - MMR
145
+ - MNG
146
+ - MAC
147
+ - MNP
148
+ - MTQ
149
+ - MRT
150
+ - MSR
151
+ - MLT
152
+ - MUS
153
+ - MDV
154
+ - MWI
155
+ - MEX
156
+ - MYS
157
+ - MOZ
158
+ - NAM
159
+ - NCL
160
+ - NER
161
+ - NFK
162
+ - NGA
163
+ - NIC
164
+ - NLD
165
+ - NOR
166
+ - NPL
167
+ - NRU
168
+ - NIU
169
+ - NZL
170
+ - OMN
171
+ - PAN
172
+ - PER
173
+ - PYF
174
+ - PNG
175
+ - PHL
176
+ - PAK
177
+ - POL
178
+ - SPM
179
+ - PCN
180
+ - PRI
181
+ - PSE
182
+ - PRT
183
+ - PLW
184
+ - PRY
185
+ - QAT
186
+ - REU
187
+ - ROU
188
+ - RUS
189
+ - RWA
190
+ - SAU
191
+ - SLB
192
+ - SYC
193
+ - SDN
194
+ - SWE
195
+ - SGP
196
+ - SHN
197
+ - SVN
198
+ - SJM
199
+ - SVK
200
+ - SLE
201
+ - SMR
202
+ - SEN
203
+ - SOM
204
+ - SUR
205
+ - STP
206
+ - SLV
207
+ - SYR
208
+ - SWZ
209
+ - TCA
210
+ - TCD
211
+ - ATF
212
+ - TGO
213
+ - THA
214
+ - TJK
215
+ - TKL
216
+ - TKM
217
+ - TUN
218
+ - TON
219
+ - TLS
220
+ - TUR
221
+ - TTO
222
+ - TUV
223
+ - TWN
224
+ - TZA
225
+ - UKR
226
+ - UGA
227
+ - UMI
228
+ - USA
229
+ - URY
230
+ - UZB
231
+ - VAT
232
+ - VCT
233
+ - VEN
234
+ - VGB
235
+ - VIR
236
+ - VNM
237
+ - VUT
238
+ - WLF
239
+ - WSM
240
+ - YEM
241
+ - MYT
242
+ - SRB
243
+ - ZAF
244
+ - ZMB
245
+ - MNE
246
+ - ZWE
247
+ - A1
248
+ - A2
249
+ - O1
250
+ - ALA
251
+ - GGY
252
+ - IMN
253
+ - JEY
254
+ - BLM
255
+ - MAF
256
+ - BES
257
+ - SSD