App-TimeZoneUtils
view release on metacpan or search on metacpan
script/detect-local-time-zone view on Meta::CPAN
#!perl
# Note: This script is a CLI for Riap function /App/TimeZoneUtils/detect_local_time_zone
# and generated automatically using Perinci::CmdLine::Gen version 0.500
use 5.010001;
use strict;
use warnings;
use Perinci::CmdLine::Any;
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2021-09-06'; # DATE
our $DIST = 'App-TimeZoneUtils'; # DIST
our $VERSION = '0.001'; # VERSION
my $cmdline = Perinci::CmdLine::Any->new(
url => "/App/TimeZoneUtils/detect_local_time_zone",
program_name => "detect-local-time-zone",
read_config => 0,
read_env => 0,
);
$cmdline->run;
# ABSTRACT: Detect local time zone
# PODNAME: detect-local-time-zone
__END__
=pod
=encoding UTF-8
=head1 NAME
detect-local-time-zone - Detect local time zone
=head1 VERSION
This document describes version 0.001 of detect-local-time-zone (from Perl distribution App-TimeZoneUtils), released on 2021-09-06.
=head1 SYNOPSIS
Usage:
% B<detect-local-time-zone> [B<--format>=I<name>|B<--json>] [B<--(no)naked-res>] [B<--page-result>[=I<program>]|B<--view-result>[=I<program>]]
=head1 DESCRIPTION
Currently uses L<DateTime::TimeZone>, which has several heuristics itself
(please see the module for more details). When local time zone cannot be
determined, it dies.
=head1 OPTIONS
C<*> marks required options.
=head2 Output options
=over
=item B<--format>=I<s>
Choose output format, e.g. json, text.
Default value:
undef
=item B<--json>
Set output format to json.
=item B<--naked-res>
When outputing as JSON, strip result envelope.
Default value:
0
By default, when outputing as JSON, the full enveloped result is returned, e.g.:
[200,"OK",[1,2,3],{"func.extra"=>4}]
The reason is so you can get the status (1st element), status message (2nd
element) as well as result metadata/extra result (4th element) instead of just
the result (3rd element). However, sometimes you want just the result, e.g. when
you want to pipe the result for more post-processing. In this case you can use
`--naked-res` so you just get:
[1,2,3]
=item B<--page-result>
Filter output through a pager.
=item B<--view-result>
View output using a viewer.
=back
=head2 Other options
=over
=item B<--help>, B<-h>, B<-?>
( run in 1.545 second using v1.01-cache-2.11-cpan-39bf76dae61 )