#!/usr/bin/perl -w
#
# Queries the timezone on the MythTV master backend
#
# Automatically detects database settings.
#

# Includes
    use DBI;
    use Getopt::Long;
    use MythTV;

# Some variables we'll use here
    our ($usage);
    our $BACKEND_SEP_rx = qr/\[\]:\[\]/;

# Load the cli options
    GetOptions('usage|help|h'                  => \$usage
              );

# Print usage
    if ($usage) {
        print <<EOF;
$0 usage:

options:

--help

    Show this help text.

EOF
        exit;
    }

# Connect to mythbackend
    my $Myth = new MythTV();

# Query the timezone
    my $response = $Myth->backend_command('QUERY_TIME_ZONE');

    my ($id, $offset, $time) = split($BACKEND_SEP_rx, $response);

    print("Current Timezone Information\n      id: $id\n  ".
          "offset: $offset\n    time: $time\n");



