ILIAS
release_5-0 Revision 5.0.0-1144-gc4397b1f870
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Files
File List
+
Globals
+
All
$
(
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
o
p
r
s
t
u
v
w
x
+
Variables
$
(
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
zoneinfo_generator.php
Go to the documentation of this file.
1
<?php
2
exit
;
3
4
define(
'ZONEINFO'
,
'/usr/share/zoneinfo'
);
5
define(
'TZ_CONVERT'
,
'tz_convert'
);
6
define(
'READLINK'
,
'readlink'
);
7
8
chdir(
'../../..'
);
9
10
include_once(
'include/inc.header.php'
);
11
include_once(
'Services/Calendar/classes/class.ilCalendarUtil.php'
);
12
13
foreach
(
ilCalendarUtil::_getShortTimeZoneList
() as $tz_name => $tmp)
14
{
15
$name_underscore = str_replace(
'/'
,
'_'
,$tz_name);
16
17
if
(is_link(
ZONEINFO
.
'/'
.$tz_name))
18
{
19
$name = exec(
READLINK
.
' -f '
.
ZONEINFO
.
'/'
.$tz_name);
20
}
21
else
22
{
23
$name =
ZONEINFO
.
'/'
.$tz_name;
24
}
25
26
exec(
TZ_CONVERT
.
' -o Services/Calendar/zoneinfo/'
.$name_underscore.
'.tmp'
.
' '
.$name);
27
28
$reader
= fopen(
'Services/Calendar/zoneinfo/'
.$name_underscore.
'.tmp'
,
'r'
);
29
$writer = fopen(
'Services/Calendar/zoneinfo/'
.$name_underscore.
'.ics'
,
'w'
);
30
31
$counter = 0;
32
while
($line = fgets(
$reader
))
33
{
34
if
(++$counter < 4)
35
{
36
continue
;
37
}
38
if
($counter == 5)
39
{
40
fputs($writer,
'TZID:'
.$tz_name.
"\n"
);
41
}
42
else
43
{
44
if
(substr($line,0,13) ===
'END:VCALENDAR'
)
45
{
46
break
;
47
}
48
fputs($writer, $line);
49
}
50
}
51
52
fclose(
$reader
);
53
fclose($writer);
54
unlink(
'Services/Calendar/zoneinfo/'
.$name_underscore.
'.tmp'
);
55
56
#echo $name_underscore.' <br />';
57
}
58
59
60
?>
$reader
$reader
Definition:
scanCallStructure.php:5
ZONEINFO
const ZONEINFO
Definition:
zoneinfo_generator.php:4
ilCalendarUtil\_getShortTimeZoneList
static _getShortTimeZoneList()
get short timezone list
Definition:
class.ilCalendarUtil.php:300
READLINK
const READLINK
Definition:
zoneinfo_generator.php:6
TZ_CONVERT
const TZ_CONVERT
Definition:
zoneinfo_generator.php:5
exit
exit
Definition:
zoneinfo_generator.php:2
Services
Calendar
zoneinfo
zoneinfo_generator.php
Generated on Mon Apr 21 2025 19:00:39 for ILIAS by
1.8.13 (using
Doxyfile
)