#!/usr/bin/perl
# Simple script to import time zone
use strict;

use EBox;
use EBox::Global;

EBox::init();
my $global = EBox::Global->getInstance();

my $ntp = EBox::Global->modInstance('ntp');

my $timezone = `cat /etc/timezone`;
chomp($timezone);

my ($continent, $country) = split('/', $timezone);

$ntp->set_string('continent', $continent);
$ntp->set_string('country', $country);
$ntp->save();
