/adei/trunk

To get this branch, use:
bzr branch http://darksoft.org/webbzr/adei/trunk
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
<?php


function adeiSetSystemTimezone() {
    global $adei_system_timezone;
    global $adei_timezone_history;

    array_push($adei_timezone_history, date_default_timezone_get());
    date_default_timezone_set($adei_system_timezone); 
}

function adeiSetClientTimezone() {
    throw new ADEIException(translate("Client timezone is not supported yet"));
}

function adeiSetUTCTimezone() {
    global $adei_timezone_history;

    array_push($adei_timezone_history, date_default_timezone_get());
    date_default_timezone_set("GMT"); 
}

function adeiRestoreTimezone()  {
    global $adei_timezone_history;

    if ($adei_timezone_history) {
	date_default_timezone_set(array_pop($adei_timezone_history));
    }
}

$adei_timezone_history = array();
$adei_system_timezone = @date_default_timezone_get();
date_default_timezone_set("GMT"); 


?>