1
# Copyright (C) 2012 eBox Technologies S.L.
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License, version 2, as
5
# published by the Free Software Foundation.
7
# This program is distributed in the hope that it will be useful,
8
# but WITHOUT ANY WARRANTY; without even the implied warranty of
9
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
# GNU General Public License for more details.
12
# You should have received a copy of the GNU General Public License
13
# along with this program; if not, write to the Free Software
14
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
# Class: EBox::SysInfo::Model::TimeZone
18
# This model is used to configure the system time zone
21
package EBox::SysInfo::Model::TimeZone;
30
use EBox::Types::TimeZone;
32
use base 'EBox::Model::DataForm';
34
use constant TZ_FILE => '/etc/timezone';
40
my $self = $class->SUPER::new(@_);
41
bless ($self, $class);
50
my @tableHead = (new EBox::Types::TimeZone( fieldName => 'timezone',
52
defaultValue => \&_getTimezone,
53
help => __('You will probably have to restart some services after ' .
54
'changing the time zone.')));
58
'tableName' => 'TimeZone',
59
'printableTableName' => __('Time zone'),
60
'modelDomain' => 'SysInfo',
61
'defaultActions' => [ 'editField' ],
62
'tableDescription' => \@tableHead,
70
my $tz = read_file(TZ_FILE);